{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 散点图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"48ed441df435449f9b1f41b621b7ba54\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_48ed441df435449f9b1f41b621b7ba54 = echarts.init(\n",
       "                    document.getElementById('48ed441df435449f9b1f41b621b7ba54'), 'white', {renderer: 'canvas'});\n",
       "                var option_48ed441df435449f9b1f41b621b7ba54 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"scatter\",\n",
       "            \"name\": \"sin\",\n",
       "            \"symbolSize\": 10,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    0.0,\n",
       "                    0.0\n",
       "                ],\n",
       "                [\n",
       "                    0.06346651825433926,\n",
       "                    0.0634239196565645\n",
       "                ],\n",
       "                [\n",
       "                    0.12693303650867852,\n",
       "                    0.12659245357374926\n",
       "                ],\n",
       "                [\n",
       "                    0.1903995547630178,\n",
       "                    0.18925124436041021\n",
       "                ],\n",
       "                [\n",
       "                    0.25386607301735703,\n",
       "                    0.2511479871810792\n",
       "                ],\n",
       "                [\n",
       "                    0.3173325912716963,\n",
       "                    0.3120334456984871\n",
       "                ],\n",
       "                [\n",
       "                    0.3807991095260356,\n",
       "                    0.3716624556603276\n",
       "                ],\n",
       "                [\n",
       "                    0.4442656277803748,\n",
       "                    0.42979491208917164\n",
       "                ],\n",
       "                [\n",
       "                    0.5077321460347141,\n",
       "                    0.4861967361004687\n",
       "                ],\n",
       "                [\n",
       "                    0.5711986642890533,\n",
       "                    0.5406408174555976\n",
       "                ],\n",
       "                [\n",
       "                    0.6346651825433925,\n",
       "                    0.5929079290546404\n",
       "                ],\n",
       "                [\n",
       "                    0.6981317007977318,\n",
       "                    0.6427876096865393\n",
       "                ],\n",
       "                [\n",
       "                    0.7615982190520711,\n",
       "                    0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    0.8250647373064104,\n",
       "                    0.7345917086575333\n",
       "                ],\n",
       "                [\n",
       "                    0.8885312555607496,\n",
       "                    0.7761464642917568\n",
       "                ],\n",
       "                [\n",
       "                    0.9519977738150889,\n",
       "                    0.8145759520503357\n",
       "                ],\n",
       "                [\n",
       "                    1.0154642920694281,\n",
       "                    0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    1.0789308103237674,\n",
       "                    0.8814533634475821\n",
       "                ],\n",
       "                [\n",
       "                    1.1423973285781066,\n",
       "                    0.9096319953545183\n",
       "                ],\n",
       "                [\n",
       "                    1.2058638468324459,\n",
       "                    0.9341478602651067\n",
       "                ],\n",
       "                [\n",
       "                    1.269330365086785,\n",
       "                    0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    1.3327968833411243,\n",
       "                    0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    1.3962634015954636,\n",
       "                    0.984807753012208\n",
       "                ],\n",
       "                [\n",
       "                    1.4597299198498028,\n",
       "                    0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    1.5231964381041423,\n",
       "                    0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    1.5866629563584815,\n",
       "                    0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    1.6501294746128208,\n",
       "                    0.9968547759519424\n",
       "                ],\n",
       "                [\n",
       "                    1.71359599286716,\n",
       "                    0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    1.7770625111214993,\n",
       "                    0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    1.8405290293758385,\n",
       "                    0.963842158559942\n",
       "                ],\n",
       "                [\n",
       "                    1.9039955476301778,\n",
       "                    0.9450008187146685\n",
       "                ],\n",
       "                [\n",
       "                    1.967462065884517,\n",
       "                    0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    2.0309285841388562,\n",
       "                    0.8959937742913359\n",
       "                ],\n",
       "                [\n",
       "                    2.0943951023931957,\n",
       "                    0.8660254037844386\n",
       "                ],\n",
       "                [\n",
       "                    2.1578616206475347,\n",
       "                    0.8325698546347714\n",
       "                ],\n",
       "                [\n",
       "                    2.221328138901874,\n",
       "                    0.795761840530832\n",
       "                ],\n",
       "                [\n",
       "                    2.284794657156213,\n",
       "                    0.7557495743542583\n",
       "                ],\n",
       "                [\n",
       "                    2.3482611754105527,\n",
       "                    0.7126941713788627\n",
       "                ],\n",
       "                [\n",
       "                    2.4117276936648917,\n",
       "                    0.6667690005162916\n",
       "                ],\n",
       "                [\n",
       "                    2.475194211919231,\n",
       "                    0.6181589862206052\n",
       "                ],\n",
       "                [\n",
       "                    2.53866073017357,\n",
       "                    0.5670598638627709\n",
       "                ],\n",
       "                [\n",
       "                    2.6021272484279097,\n",
       "                    0.5136773915734063\n",
       "                ],\n",
       "                [\n",
       "                    2.6655937666822487,\n",
       "                    0.4582265217274105\n",
       "                ],\n",
       "                [\n",
       "                    2.729060284936588,\n",
       "                    0.4009305354066136\n",
       "                ],\n",
       "                [\n",
       "                    2.792526803190927,\n",
       "                    0.3420201433256689\n",
       "                ],\n",
       "                [\n",
       "                    2.8559933214452666,\n",
       "                    0.28173255684142967\n",
       "                ],\n",
       "                [\n",
       "                    2.9194598396996057,\n",
       "                    0.2203105327865408\n",
       "                ],\n",
       "                [\n",
       "                    2.982926357953945,\n",
       "                    0.1580013959733499\n",
       "                ],\n",
       "                [\n",
       "                    3.0463928762082846,\n",
       "                    0.09505604330418244\n",
       "                ],\n",
       "                [\n",
       "                    3.1098593944626236,\n",
       "                    0.031727933498067656\n",
       "                ],\n",
       "                [\n",
       "                    3.173325912716963,\n",
       "                    -0.03172793349806786\n",
       "                ],\n",
       "                [\n",
       "                    3.236792430971302,\n",
       "                    -0.09505604330418263\n",
       "                ],\n",
       "                [\n",
       "                    3.3002589492256416,\n",
       "                    -0.15800139597335008\n",
       "                ],\n",
       "                [\n",
       "                    3.3637254674799806,\n",
       "                    -0.22031053278654056\n",
       "                ],\n",
       "                [\n",
       "                    3.42719198573432,\n",
       "                    -0.28173255684142984\n",
       "                ],\n",
       "                [\n",
       "                    3.490658503988659,\n",
       "                    -0.34202014332566866\n",
       "                ],\n",
       "                [\n",
       "                    3.5541250222429985,\n",
       "                    -0.4009305354066138\n",
       "                ],\n",
       "                [\n",
       "                    3.6175915404973376,\n",
       "                    -0.4582265217274103\n",
       "                ],\n",
       "                [\n",
       "                    3.681058058751677,\n",
       "                    -0.5136773915734064\n",
       "                ],\n",
       "                [\n",
       "                    3.744524577006016,\n",
       "                    -0.5670598638627706\n",
       "                ],\n",
       "                [\n",
       "                    3.8079910952603555,\n",
       "                    -0.6181589862206053\n",
       "                ],\n",
       "                [\n",
       "                    3.8714576135146945,\n",
       "                    -0.6667690005162915\n",
       "                ],\n",
       "                [\n",
       "                    3.934924131769034,\n",
       "                    -0.7126941713788629\n",
       "                ],\n",
       "                [\n",
       "                    3.998390650023373,\n",
       "                    -0.7557495743542582\n",
       "                ],\n",
       "                [\n",
       "                    4.0618571682777125,\n",
       "                    -0.7957618405308321\n",
       "                ],\n",
       "                [\n",
       "                    4.1253236865320515,\n",
       "                    -0.8325698546347713\n",
       "                ],\n",
       "                [\n",
       "                    4.188790204786391,\n",
       "                    -0.8660254037844388\n",
       "                ],\n",
       "                [\n",
       "                    4.25225672304073,\n",
       "                    -0.895993774291336\n",
       "                ],\n",
       "                [\n",
       "                    4.3157232412950695,\n",
       "                    -0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    4.3791897595494085,\n",
       "                    -0.9450008187146683\n",
       "                ],\n",
       "                [\n",
       "                    4.442656277803748,\n",
       "                    -0.9638421585599422\n",
       "                ],\n",
       "                [\n",
       "                    4.506122796058087,\n",
       "                    -0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    4.569589314312426,\n",
       "                    -0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    4.6330558325667655,\n",
       "                    -0.9968547759519423\n",
       "                ],\n",
       "                [\n",
       "                    4.696522350821105,\n",
       "                    -0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    4.759988869075444,\n",
       "                    -0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    4.823455387329783,\n",
       "                    -0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    4.886921905584122,\n",
       "                    -0.9848077530122081\n",
       "                ],\n",
       "                [\n",
       "                    4.950388423838462,\n",
       "                    -0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    5.013854942092801,\n",
       "                    -0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    5.07732146034714,\n",
       "                    -0.9341478602651068\n",
       "                ],\n",
       "                [\n",
       "                    5.14078797860148,\n",
       "                    -0.9096319953545182\n",
       "                ],\n",
       "                [\n",
       "                    5.204254496855819,\n",
       "                    -0.881453363447582\n",
       "                ],\n",
       "                [\n",
       "                    5.267721015110158,\n",
       "                    -0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    5.331187533364497,\n",
       "                    -0.8145759520503358\n",
       "                ],\n",
       "                [\n",
       "                    5.394654051618837,\n",
       "                    -0.7761464642917566\n",
       "                ],\n",
       "                [\n",
       "                    5.458120569873176,\n",
       "                    -0.7345917086575331\n",
       "                ],\n",
       "                [\n",
       "                    5.521587088127515,\n",
       "                    -0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    5.585053606381854,\n",
       "                    -0.6427876096865396\n",
       "                ],\n",
       "                [\n",
       "                    5.648520124636194,\n",
       "                    -0.5929079290546402\n",
       "                ],\n",
       "                [\n",
       "                    5.711986642890533,\n",
       "                    -0.5406408174555974\n",
       "                ],\n",
       "                [\n",
       "                    5.775453161144872,\n",
       "                    -0.4861967361004688\n",
       "                ],\n",
       "                [\n",
       "                    5.838919679399211,\n",
       "                    -0.4297949120891719\n",
       "                ],\n",
       "                [\n",
       "                    5.902386197653551,\n",
       "                    -0.37166245566032724\n",
       "                ],\n",
       "                [\n",
       "                    5.96585271590789,\n",
       "                    -0.31203344569848707\n",
       "                ],\n",
       "                [\n",
       "                    6.029319234162229,\n",
       "                    -0.2511479871810794\n",
       "                ],\n",
       "                [\n",
       "                    6.092785752416569,\n",
       "                    -0.18925124436040974\n",
       "                ],\n",
       "                [\n",
       "                    6.156252270670908,\n",
       "                    -0.12659245357374904\n",
       "                ],\n",
       "                [\n",
       "                    6.219718788925247,\n",
       "                    -0.06342391965656452\n",
       "                ],\n",
       "                [\n",
       "                    6.283185307179586,\n",
       "                    -2.4492935982947064e-16\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"scatter\",\n",
       "            \"name\": \"cos\",\n",
       "            \"symbolSize\": 10,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    0.0,\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    0.06346651825433926,\n",
       "                    0.9979866764718844\n",
       "                ],\n",
       "                [\n",
       "                    0.12693303650867852,\n",
       "                    0.9919548128307953\n",
       "                ],\n",
       "                [\n",
       "                    0.1903995547630178,\n",
       "                    0.9819286972627067\n",
       "                ],\n",
       "                [\n",
       "                    0.25386607301735703,\n",
       "                    0.9679487013963562\n",
       "                ],\n",
       "                [\n",
       "                    0.3173325912716963,\n",
       "                    0.9500711177409454\n",
       "                ],\n",
       "                [\n",
       "                    0.3807991095260356,\n",
       "                    0.9283679330160726\n",
       "                ],\n",
       "                [\n",
       "                    0.4442656277803748,\n",
       "                    0.9029265382866212\n",
       "                ],\n",
       "                [\n",
       "                    0.5077321460347141,\n",
       "                    0.8738493770697849\n",
       "                ],\n",
       "                [\n",
       "                    0.5711986642890533,\n",
       "                    0.8412535328311812\n",
       "                ],\n",
       "                [\n",
       "                    0.6346651825433925,\n",
       "                    0.8052702575310586\n",
       "                ],\n",
       "                [\n",
       "                    0.6981317007977318,\n",
       "                    0.766044443118978\n",
       "                ],\n",
       "                [\n",
       "                    0.7615982190520711,\n",
       "                    0.7237340381050702\n",
       "                ],\n",
       "                [\n",
       "                    0.8250647373064104,\n",
       "                    0.6785094115571322\n",
       "                ],\n",
       "                [\n",
       "                    0.8885312555607496,\n",
       "                    0.6305526670845225\n",
       "                ],\n",
       "                [\n",
       "                    0.9519977738150889,\n",
       "                    0.5800569095711982\n",
       "                ],\n",
       "                [\n",
       "                    1.0154642920694281,\n",
       "                    0.5272254676105024\n",
       "                ],\n",
       "                [\n",
       "                    1.0789308103237674,\n",
       "                    0.4722710747726827\n",
       "                ],\n",
       "                [\n",
       "                    1.1423973285781066,\n",
       "                    0.41541501300188644\n",
       "                ],\n",
       "                [\n",
       "                    1.2058638468324459,\n",
       "                    0.3568862215918719\n",
       "                ],\n",
       "                [\n",
       "                    1.269330365086785,\n",
       "                    0.2969203753282749\n",
       "                ],\n",
       "                [\n",
       "                    1.3327968833411243,\n",
       "                    0.23575893550942728\n",
       "                ],\n",
       "                [\n",
       "                    1.3962634015954636,\n",
       "                    0.17364817766693041\n",
       "                ],\n",
       "                [\n",
       "                    1.4597299198498028,\n",
       "                    0.1108381999010111\n",
       "                ],\n",
       "                [\n",
       "                    1.5231964381041423,\n",
       "                    0.04758191582374218\n",
       "                ],\n",
       "                [\n",
       "                    1.5866629563584815,\n",
       "                    -0.01586596383480803\n",
       "                ],\n",
       "                [\n",
       "                    1.6501294746128208,\n",
       "                    -0.07924995685678854\n",
       "                ],\n",
       "                [\n",
       "                    1.71359599286716,\n",
       "                    -0.14231483827328523\n",
       "                ],\n",
       "                [\n",
       "                    1.7770625111214993,\n",
       "                    -0.20480666806519074\n",
       "                ],\n",
       "                [\n",
       "                    1.8405290293758385,\n",
       "                    -0.26647381369003503\n",
       "                ],\n",
       "                [\n",
       "                    1.9039955476301778,\n",
       "                    -0.32706796331742166\n",
       "                ],\n",
       "                [\n",
       "                    1.967462065884517,\n",
       "                    -0.3863451256931287\n",
       "                ],\n",
       "                [\n",
       "                    2.0309285841388562,\n",
       "                    -0.4440666126057741\n",
       "                ],\n",
       "                [\n",
       "                    2.0943951023931957,\n",
       "                    -0.5000000000000002\n",
       "                ],\n",
       "                [\n",
       "                    2.1578616206475347,\n",
       "                    -0.5539200638661103\n",
       "                ],\n",
       "                [\n",
       "                    2.221328138901874,\n",
       "                    -0.6056096871376668\n",
       "                ],\n",
       "                [\n",
       "                    2.284794657156213,\n",
       "                    -0.654860733945285\n",
       "                ],\n",
       "                [\n",
       "                    2.3482611754105527,\n",
       "                    -0.7014748877063214\n",
       "                ],\n",
       "                [\n",
       "                    2.4117276936648917,\n",
       "                    -0.7452644496757547\n",
       "                ],\n",
       "                [\n",
       "                    2.475194211919231,\n",
       "                    -0.7860530947427875\n",
       "                ],\n",
       "                [\n",
       "                    2.53866073017357,\n",
       "                    -0.8236765814298327\n",
       "                ],\n",
       "                [\n",
       "                    2.6021272484279097,\n",
       "                    -0.8579834132349771\n",
       "                ],\n",
       "                [\n",
       "                    2.6655937666822487,\n",
       "                    -0.8888354486549234\n",
       "                ],\n",
       "                [\n",
       "                    2.729060284936588,\n",
       "                    -0.9161084574320696\n",
       "                ],\n",
       "                [\n",
       "                    2.792526803190927,\n",
       "                    -0.9396926207859083\n",
       "                ],\n",
       "                [\n",
       "                    2.8559933214452666,\n",
       "                    -0.9594929736144974\n",
       "                ],\n",
       "                [\n",
       "                    2.9194598396996057,\n",
       "                    -0.975429786885407\n",
       "                ],\n",
       "                [\n",
       "                    2.982926357953945,\n",
       "                    -0.9874388886763943\n",
       "                ],\n",
       "                [\n",
       "                    3.0463928762082846,\n",
       "                    -0.9954719225730846\n",
       "                ],\n",
       "                [\n",
       "                    3.1098593944626236,\n",
       "                    -0.9994965423831851\n",
       "                ],\n",
       "                [\n",
       "                    3.173325912716963,\n",
       "                    -0.9994965423831851\n",
       "                ],\n",
       "                [\n",
       "                    3.236792430971302,\n",
       "                    -0.9954719225730846\n",
       "                ],\n",
       "                [\n",
       "                    3.3002589492256416,\n",
       "                    -0.9874388886763943\n",
       "                ],\n",
       "                [\n",
       "                    3.3637254674799806,\n",
       "                    -0.975429786885407\n",
       "                ],\n",
       "                [\n",
       "                    3.42719198573432,\n",
       "                    -0.9594929736144974\n",
       "                ],\n",
       "                [\n",
       "                    3.490658503988659,\n",
       "                    -0.9396926207859084\n",
       "                ],\n",
       "                [\n",
       "                    3.5541250222429985,\n",
       "                    -0.9161084574320696\n",
       "                ],\n",
       "                [\n",
       "                    3.6175915404973376,\n",
       "                    -0.8888354486549235\n",
       "                ],\n",
       "                [\n",
       "                    3.681058058751677,\n",
       "                    -0.857983413234977\n",
       "                ],\n",
       "                [\n",
       "                    3.744524577006016,\n",
       "                    -0.8236765814298328\n",
       "                ],\n",
       "                [\n",
       "                    3.8079910952603555,\n",
       "                    -0.7860530947427874\n",
       "                ],\n",
       "                [\n",
       "                    3.8714576135146945,\n",
       "                    -0.7452644496757548\n",
       "                ],\n",
       "                [\n",
       "                    3.934924131769034,\n",
       "                    -0.7014748877063213\n",
       "                ],\n",
       "                [\n",
       "                    3.998390650023373,\n",
       "                    -0.6548607339452852\n",
       "                ],\n",
       "                [\n",
       "                    4.0618571682777125,\n",
       "                    -0.6056096871376666\n",
       "                ],\n",
       "                [\n",
       "                    4.1253236865320515,\n",
       "                    -0.5539200638661105\n",
       "                ],\n",
       "                [\n",
       "                    4.188790204786391,\n",
       "                    -0.4999999999999996\n",
       "                ],\n",
       "                [\n",
       "                    4.25225672304073,\n",
       "                    -0.44406661260577396\n",
       "                ],\n",
       "                [\n",
       "                    4.3157232412950695,\n",
       "                    -0.3863451256931287\n",
       "                ],\n",
       "                [\n",
       "                    4.3791897595494085,\n",
       "                    -0.3270679633174219\n",
       "                ],\n",
       "                [\n",
       "                    4.442656277803748,\n",
       "                    -0.26647381369003464\n",
       "                ],\n",
       "                [\n",
       "                    4.506122796058087,\n",
       "                    -0.20480666806519054\n",
       "                ],\n",
       "                [\n",
       "                    4.569589314312426,\n",
       "                    -0.14231483827328523\n",
       "                ],\n",
       "                [\n",
       "                    4.6330558325667655,\n",
       "                    -0.07924995685678879\n",
       "                ],\n",
       "                [\n",
       "                    4.696522350821105,\n",
       "                    -0.01586596383480761\n",
       "                ],\n",
       "                [\n",
       "                    4.759988869075444,\n",
       "                    0.04758191582374238\n",
       "                ],\n",
       "                [\n",
       "                    4.823455387329783,\n",
       "                    0.11083819990101086\n",
       "                ],\n",
       "                [\n",
       "                    4.886921905584122,\n",
       "                    0.17364817766692997\n",
       "                ],\n",
       "                [\n",
       "                    4.950388423838462,\n",
       "                    0.23575893550942748\n",
       "                ],\n",
       "                [\n",
       "                    5.013854942092801,\n",
       "                    0.2969203753282749\n",
       "                ],\n",
       "                [\n",
       "                    5.07732146034714,\n",
       "                    0.35688622159187167\n",
       "                ],\n",
       "                [\n",
       "                    5.14078797860148,\n",
       "                    0.4154150130018868\n",
       "                ],\n",
       "                [\n",
       "                    5.204254496855819,\n",
       "                    0.4722710747726829\n",
       "                ],\n",
       "                [\n",
       "                    5.267721015110158,\n",
       "                    0.5272254676105024\n",
       "                ],\n",
       "                [\n",
       "                    5.331187533364497,\n",
       "                    0.5800569095711979\n",
       "                ],\n",
       "                [\n",
       "                    5.394654051618837,\n",
       "                    0.6305526670845228\n",
       "                ],\n",
       "                [\n",
       "                    5.458120569873176,\n",
       "                    0.6785094115571323\n",
       "                ],\n",
       "                [\n",
       "                    5.521587088127515,\n",
       "                    0.7237340381050701\n",
       "                ],\n",
       "                [\n",
       "                    5.585053606381854,\n",
       "                    0.7660444431189778\n",
       "                ],\n",
       "                [\n",
       "                    5.648520124636194,\n",
       "                    0.8052702575310587\n",
       "                ],\n",
       "                [\n",
       "                    5.711986642890533,\n",
       "                    0.8412535328311812\n",
       "                ],\n",
       "                [\n",
       "                    5.775453161144872,\n",
       "                    0.8738493770697848\n",
       "                ],\n",
       "                [\n",
       "                    5.838919679399211,\n",
       "                    0.9029265382866211\n",
       "                ],\n",
       "                [\n",
       "                    5.902386197653551,\n",
       "                    0.9283679330160727\n",
       "                ],\n",
       "                [\n",
       "                    5.96585271590789,\n",
       "                    0.9500711177409454\n",
       "                ],\n",
       "                [\n",
       "                    6.029319234162229,\n",
       "                    0.9679487013963562\n",
       "                ],\n",
       "                [\n",
       "                    6.092785752416569,\n",
       "                    0.9819286972627068\n",
       "                ],\n",
       "                [\n",
       "                    6.156252270670908,\n",
       "                    0.9919548128307953\n",
       "                ],\n",
       "                [\n",
       "                    6.219718788925247,\n",
       "                    0.9979866764718844\n",
       "                ],\n",
       "                [\n",
       "                    6.283185307179586,\n",
       "                    1.0\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"sin\",\n",
       "                \"cos\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"sin\": true,\n",
       "                \"cos\": true\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_48ed441df435449f9b1f41b621b7ba54.setOption(option_48ed441df435449f9b1f41b621b7ba54);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x25545802ec8>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Scatter\n",
    "import pyecharts.options as opts\n",
    "import numpy as np\n",
    "\n",
    "x=np.linspace(0,2*np.pi,100)\n",
    "y=np.sin(x)\n",
    "y2=np.cos(x)\n",
    "\n",
    "(Scatter(init_opts=opts.InitOpts(width='720px',height='320px'))\n",
    ".add_xaxis(xaxis_data=x)\n",
    ".add_yaxis(series_name='sin',y_axis=y)\n",
    ".add_yaxis(series_name='cos',y_axis=y2,label_opts=opts.LabelOpts(is_show=False))#label_opt是为了让cos不显示数值\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"147cb378070e454aa1175759954c59bb\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_147cb378070e454aa1175759954c59bb = echarts.init(\n",
       "                    document.getElementById('147cb378070e454aa1175759954c59bb'), 'white', {renderer: 'canvas'});\n",
       "                var option_147cb378070e454aa1175759954c59bb = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"sin\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    0.0,\n",
       "                    0.0\n",
       "                ],\n",
       "                [\n",
       "                    0.06346651825433926,\n",
       "                    0.0634239196565645\n",
       "                ],\n",
       "                [\n",
       "                    0.12693303650867852,\n",
       "                    0.12659245357374926\n",
       "                ],\n",
       "                [\n",
       "                    0.1903995547630178,\n",
       "                    0.18925124436041021\n",
       "                ],\n",
       "                [\n",
       "                    0.25386607301735703,\n",
       "                    0.2511479871810792\n",
       "                ],\n",
       "                [\n",
       "                    0.3173325912716963,\n",
       "                    0.3120334456984871\n",
       "                ],\n",
       "                [\n",
       "                    0.3807991095260356,\n",
       "                    0.3716624556603276\n",
       "                ],\n",
       "                [\n",
       "                    0.4442656277803748,\n",
       "                    0.42979491208917164\n",
       "                ],\n",
       "                [\n",
       "                    0.5077321460347141,\n",
       "                    0.4861967361004687\n",
       "                ],\n",
       "                [\n",
       "                    0.5711986642890533,\n",
       "                    0.5406408174555976\n",
       "                ],\n",
       "                [\n",
       "                    0.6346651825433925,\n",
       "                    0.5929079290546404\n",
       "                ],\n",
       "                [\n",
       "                    0.6981317007977318,\n",
       "                    0.6427876096865393\n",
       "                ],\n",
       "                [\n",
       "                    0.7615982190520711,\n",
       "                    0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    0.8250647373064104,\n",
       "                    0.7345917086575333\n",
       "                ],\n",
       "                [\n",
       "                    0.8885312555607496,\n",
       "                    0.7761464642917568\n",
       "                ],\n",
       "                [\n",
       "                    0.9519977738150889,\n",
       "                    0.8145759520503357\n",
       "                ],\n",
       "                [\n",
       "                    1.0154642920694281,\n",
       "                    0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    1.0789308103237674,\n",
       "                    0.8814533634475821\n",
       "                ],\n",
       "                [\n",
       "                    1.1423973285781066,\n",
       "                    0.9096319953545183\n",
       "                ],\n",
       "                [\n",
       "                    1.2058638468324459,\n",
       "                    0.9341478602651067\n",
       "                ],\n",
       "                [\n",
       "                    1.269330365086785,\n",
       "                    0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    1.3327968833411243,\n",
       "                    0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    1.3962634015954636,\n",
       "                    0.984807753012208\n",
       "                ],\n",
       "                [\n",
       "                    1.4597299198498028,\n",
       "                    0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    1.5231964381041423,\n",
       "                    0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    1.5866629563584815,\n",
       "                    0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    1.6501294746128208,\n",
       "                    0.9968547759519424\n",
       "                ],\n",
       "                [\n",
       "                    1.71359599286716,\n",
       "                    0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    1.7770625111214993,\n",
       "                    0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    1.8405290293758385,\n",
       "                    0.963842158559942\n",
       "                ],\n",
       "                [\n",
       "                    1.9039955476301778,\n",
       "                    0.9450008187146685\n",
       "                ],\n",
       "                [\n",
       "                    1.967462065884517,\n",
       "                    0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    2.0309285841388562,\n",
       "                    0.8959937742913359\n",
       "                ],\n",
       "                [\n",
       "                    2.0943951023931957,\n",
       "                    0.8660254037844386\n",
       "                ],\n",
       "                [\n",
       "                    2.1578616206475347,\n",
       "                    0.8325698546347714\n",
       "                ],\n",
       "                [\n",
       "                    2.221328138901874,\n",
       "                    0.795761840530832\n",
       "                ],\n",
       "                [\n",
       "                    2.284794657156213,\n",
       "                    0.7557495743542583\n",
       "                ],\n",
       "                [\n",
       "                    2.3482611754105527,\n",
       "                    0.7126941713788627\n",
       "                ],\n",
       "                [\n",
       "                    2.4117276936648917,\n",
       "                    0.6667690005162916\n",
       "                ],\n",
       "                [\n",
       "                    2.475194211919231,\n",
       "                    0.6181589862206052\n",
       "                ],\n",
       "                [\n",
       "                    2.53866073017357,\n",
       "                    0.5670598638627709\n",
       "                ],\n",
       "                [\n",
       "                    2.6021272484279097,\n",
       "                    0.5136773915734063\n",
       "                ],\n",
       "                [\n",
       "                    2.6655937666822487,\n",
       "                    0.4582265217274105\n",
       "                ],\n",
       "                [\n",
       "                    2.729060284936588,\n",
       "                    0.4009305354066136\n",
       "                ],\n",
       "                [\n",
       "                    2.792526803190927,\n",
       "                    0.3420201433256689\n",
       "                ],\n",
       "                [\n",
       "                    2.8559933214452666,\n",
       "                    0.28173255684142967\n",
       "                ],\n",
       "                [\n",
       "                    2.9194598396996057,\n",
       "                    0.2203105327865408\n",
       "                ],\n",
       "                [\n",
       "                    2.982926357953945,\n",
       "                    0.1580013959733499\n",
       "                ],\n",
       "                [\n",
       "                    3.0463928762082846,\n",
       "                    0.09505604330418244\n",
       "                ],\n",
       "                [\n",
       "                    3.1098593944626236,\n",
       "                    0.031727933498067656\n",
       "                ],\n",
       "                [\n",
       "                    3.173325912716963,\n",
       "                    -0.03172793349806786\n",
       "                ],\n",
       "                [\n",
       "                    3.236792430971302,\n",
       "                    -0.09505604330418263\n",
       "                ],\n",
       "                [\n",
       "                    3.3002589492256416,\n",
       "                    -0.15800139597335008\n",
       "                ],\n",
       "                [\n",
       "                    3.3637254674799806,\n",
       "                    -0.22031053278654056\n",
       "                ],\n",
       "                [\n",
       "                    3.42719198573432,\n",
       "                    -0.28173255684142984\n",
       "                ],\n",
       "                [\n",
       "                    3.490658503988659,\n",
       "                    -0.34202014332566866\n",
       "                ],\n",
       "                [\n",
       "                    3.5541250222429985,\n",
       "                    -0.4009305354066138\n",
       "                ],\n",
       "                [\n",
       "                    3.6175915404973376,\n",
       "                    -0.4582265217274103\n",
       "                ],\n",
       "                [\n",
       "                    3.681058058751677,\n",
       "                    -0.5136773915734064\n",
       "                ],\n",
       "                [\n",
       "                    3.744524577006016,\n",
       "                    -0.5670598638627706\n",
       "                ],\n",
       "                [\n",
       "                    3.8079910952603555,\n",
       "                    -0.6181589862206053\n",
       "                ],\n",
       "                [\n",
       "                    3.8714576135146945,\n",
       "                    -0.6667690005162915\n",
       "                ],\n",
       "                [\n",
       "                    3.934924131769034,\n",
       "                    -0.7126941713788629\n",
       "                ],\n",
       "                [\n",
       "                    3.998390650023373,\n",
       "                    -0.7557495743542582\n",
       "                ],\n",
       "                [\n",
       "                    4.0618571682777125,\n",
       "                    -0.7957618405308321\n",
       "                ],\n",
       "                [\n",
       "                    4.1253236865320515,\n",
       "                    -0.8325698546347713\n",
       "                ],\n",
       "                [\n",
       "                    4.188790204786391,\n",
       "                    -0.8660254037844388\n",
       "                ],\n",
       "                [\n",
       "                    4.25225672304073,\n",
       "                    -0.895993774291336\n",
       "                ],\n",
       "                [\n",
       "                    4.3157232412950695,\n",
       "                    -0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    4.3791897595494085,\n",
       "                    -0.9450008187146683\n",
       "                ],\n",
       "                [\n",
       "                    4.442656277803748,\n",
       "                    -0.9638421585599422\n",
       "                ],\n",
       "                [\n",
       "                    4.506122796058087,\n",
       "                    -0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    4.569589314312426,\n",
       "                    -0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    4.6330558325667655,\n",
       "                    -0.9968547759519423\n",
       "                ],\n",
       "                [\n",
       "                    4.696522350821105,\n",
       "                    -0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    4.759988869075444,\n",
       "                    -0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    4.823455387329783,\n",
       "                    -0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    4.886921905584122,\n",
       "                    -0.9848077530122081\n",
       "                ],\n",
       "                [\n",
       "                    4.950388423838462,\n",
       "                    -0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    5.013854942092801,\n",
       "                    -0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    5.07732146034714,\n",
       "                    -0.9341478602651068\n",
       "                ],\n",
       "                [\n",
       "                    5.14078797860148,\n",
       "                    -0.9096319953545182\n",
       "                ],\n",
       "                [\n",
       "                    5.204254496855819,\n",
       "                    -0.881453363447582\n",
       "                ],\n",
       "                [\n",
       "                    5.267721015110158,\n",
       "                    -0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    5.331187533364497,\n",
       "                    -0.8145759520503358\n",
       "                ],\n",
       "                [\n",
       "                    5.394654051618837,\n",
       "                    -0.7761464642917566\n",
       "                ],\n",
       "                [\n",
       "                    5.458120569873176,\n",
       "                    -0.7345917086575331\n",
       "                ],\n",
       "                [\n",
       "                    5.521587088127515,\n",
       "                    -0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    5.585053606381854,\n",
       "                    -0.6427876096865396\n",
       "                ],\n",
       "                [\n",
       "                    5.648520124636194,\n",
       "                    -0.5929079290546402\n",
       "                ],\n",
       "                [\n",
       "                    5.711986642890533,\n",
       "                    -0.5406408174555974\n",
       "                ],\n",
       "                [\n",
       "                    5.775453161144872,\n",
       "                    -0.4861967361004688\n",
       "                ],\n",
       "                [\n",
       "                    5.838919679399211,\n",
       "                    -0.4297949120891719\n",
       "                ],\n",
       "                [\n",
       "                    5.902386197653551,\n",
       "                    -0.37166245566032724\n",
       "                ],\n",
       "                [\n",
       "                    5.96585271590789,\n",
       "                    -0.31203344569848707\n",
       "                ],\n",
       "                [\n",
       "                    6.029319234162229,\n",
       "                    -0.2511479871810794\n",
       "                ],\n",
       "                [\n",
       "                    6.092785752416569,\n",
       "                    -0.18925124436040974\n",
       "                ],\n",
       "                [\n",
       "                    6.156252270670908,\n",
       "                    -0.12659245357374904\n",
       "                ],\n",
       "                [\n",
       "                    6.219718788925247,\n",
       "                    -0.06342391965656452\n",
       "                ],\n",
       "                [\n",
       "                    6.283185307179586,\n",
       "                    -2.4492935982947064e-16\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"cos\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    0.0,\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    0.06346651825433926,\n",
       "                    0.9979866764718844\n",
       "                ],\n",
       "                [\n",
       "                    0.12693303650867852,\n",
       "                    0.9919548128307953\n",
       "                ],\n",
       "                [\n",
       "                    0.1903995547630178,\n",
       "                    0.9819286972627067\n",
       "                ],\n",
       "                [\n",
       "                    0.25386607301735703,\n",
       "                    0.9679487013963562\n",
       "                ],\n",
       "                [\n",
       "                    0.3173325912716963,\n",
       "                    0.9500711177409454\n",
       "                ],\n",
       "                [\n",
       "                    0.3807991095260356,\n",
       "                    0.9283679330160726\n",
       "                ],\n",
       "                [\n",
       "                    0.4442656277803748,\n",
       "                    0.9029265382866212\n",
       "                ],\n",
       "                [\n",
       "                    0.5077321460347141,\n",
       "                    0.8738493770697849\n",
       "                ],\n",
       "                [\n",
       "                    0.5711986642890533,\n",
       "                    0.8412535328311812\n",
       "                ],\n",
       "                [\n",
       "                    0.6346651825433925,\n",
       "                    0.8052702575310586\n",
       "                ],\n",
       "                [\n",
       "                    0.6981317007977318,\n",
       "                    0.766044443118978\n",
       "                ],\n",
       "                [\n",
       "                    0.7615982190520711,\n",
       "                    0.7237340381050702\n",
       "                ],\n",
       "                [\n",
       "                    0.8250647373064104,\n",
       "                    0.6785094115571322\n",
       "                ],\n",
       "                [\n",
       "                    0.8885312555607496,\n",
       "                    0.6305526670845225\n",
       "                ],\n",
       "                [\n",
       "                    0.9519977738150889,\n",
       "                    0.5800569095711982\n",
       "                ],\n",
       "                [\n",
       "                    1.0154642920694281,\n",
       "                    0.5272254676105024\n",
       "                ],\n",
       "                [\n",
       "                    1.0789308103237674,\n",
       "                    0.4722710747726827\n",
       "                ],\n",
       "                [\n",
       "                    1.1423973285781066,\n",
       "                    0.41541501300188644\n",
       "                ],\n",
       "                [\n",
       "                    1.2058638468324459,\n",
       "                    0.3568862215918719\n",
       "                ],\n",
       "                [\n",
       "                    1.269330365086785,\n",
       "                    0.2969203753282749\n",
       "                ],\n",
       "                [\n",
       "                    1.3327968833411243,\n",
       "                    0.23575893550942728\n",
       "                ],\n",
       "                [\n",
       "                    1.3962634015954636,\n",
       "                    0.17364817766693041\n",
       "                ],\n",
       "                [\n",
       "                    1.4597299198498028,\n",
       "                    0.1108381999010111\n",
       "                ],\n",
       "                [\n",
       "                    1.5231964381041423,\n",
       "                    0.04758191582374218\n",
       "                ],\n",
       "                [\n",
       "                    1.5866629563584815,\n",
       "                    -0.01586596383480803\n",
       "                ],\n",
       "                [\n",
       "                    1.6501294746128208,\n",
       "                    -0.07924995685678854\n",
       "                ],\n",
       "                [\n",
       "                    1.71359599286716,\n",
       "                    -0.14231483827328523\n",
       "                ],\n",
       "                [\n",
       "                    1.7770625111214993,\n",
       "                    -0.20480666806519074\n",
       "                ],\n",
       "                [\n",
       "                    1.8405290293758385,\n",
       "                    -0.26647381369003503\n",
       "                ],\n",
       "                [\n",
       "                    1.9039955476301778,\n",
       "                    -0.32706796331742166\n",
       "                ],\n",
       "                [\n",
       "                    1.967462065884517,\n",
       "                    -0.3863451256931287\n",
       "                ],\n",
       "                [\n",
       "                    2.0309285841388562,\n",
       "                    -0.4440666126057741\n",
       "                ],\n",
       "                [\n",
       "                    2.0943951023931957,\n",
       "                    -0.5000000000000002\n",
       "                ],\n",
       "                [\n",
       "                    2.1578616206475347,\n",
       "                    -0.5539200638661103\n",
       "                ],\n",
       "                [\n",
       "                    2.221328138901874,\n",
       "                    -0.6056096871376668\n",
       "                ],\n",
       "                [\n",
       "                    2.284794657156213,\n",
       "                    -0.654860733945285\n",
       "                ],\n",
       "                [\n",
       "                    2.3482611754105527,\n",
       "                    -0.7014748877063214\n",
       "                ],\n",
       "                [\n",
       "                    2.4117276936648917,\n",
       "                    -0.7452644496757547\n",
       "                ],\n",
       "                [\n",
       "                    2.475194211919231,\n",
       "                    -0.7860530947427875\n",
       "                ],\n",
       "                [\n",
       "                    2.53866073017357,\n",
       "                    -0.8236765814298327\n",
       "                ],\n",
       "                [\n",
       "                    2.6021272484279097,\n",
       "                    -0.8579834132349771\n",
       "                ],\n",
       "                [\n",
       "                    2.6655937666822487,\n",
       "                    -0.8888354486549234\n",
       "                ],\n",
       "                [\n",
       "                    2.729060284936588,\n",
       "                    -0.9161084574320696\n",
       "                ],\n",
       "                [\n",
       "                    2.792526803190927,\n",
       "                    -0.9396926207859083\n",
       "                ],\n",
       "                [\n",
       "                    2.8559933214452666,\n",
       "                    -0.9594929736144974\n",
       "                ],\n",
       "                [\n",
       "                    2.9194598396996057,\n",
       "                    -0.975429786885407\n",
       "                ],\n",
       "                [\n",
       "                    2.982926357953945,\n",
       "                    -0.9874388886763943\n",
       "                ],\n",
       "                [\n",
       "                    3.0463928762082846,\n",
       "                    -0.9954719225730846\n",
       "                ],\n",
       "                [\n",
       "                    3.1098593944626236,\n",
       "                    -0.9994965423831851\n",
       "                ],\n",
       "                [\n",
       "                    3.173325912716963,\n",
       "                    -0.9994965423831851\n",
       "                ],\n",
       "                [\n",
       "                    3.236792430971302,\n",
       "                    -0.9954719225730846\n",
       "                ],\n",
       "                [\n",
       "                    3.3002589492256416,\n",
       "                    -0.9874388886763943\n",
       "                ],\n",
       "                [\n",
       "                    3.3637254674799806,\n",
       "                    -0.975429786885407\n",
       "                ],\n",
       "                [\n",
       "                    3.42719198573432,\n",
       "                    -0.9594929736144974\n",
       "                ],\n",
       "                [\n",
       "                    3.490658503988659,\n",
       "                    -0.9396926207859084\n",
       "                ],\n",
       "                [\n",
       "                    3.5541250222429985,\n",
       "                    -0.9161084574320696\n",
       "                ],\n",
       "                [\n",
       "                    3.6175915404973376,\n",
       "                    -0.8888354486549235\n",
       "                ],\n",
       "                [\n",
       "                    3.681058058751677,\n",
       "                    -0.857983413234977\n",
       "                ],\n",
       "                [\n",
       "                    3.744524577006016,\n",
       "                    -0.8236765814298328\n",
       "                ],\n",
       "                [\n",
       "                    3.8079910952603555,\n",
       "                    -0.7860530947427874\n",
       "                ],\n",
       "                [\n",
       "                    3.8714576135146945,\n",
       "                    -0.7452644496757548\n",
       "                ],\n",
       "                [\n",
       "                    3.934924131769034,\n",
       "                    -0.7014748877063213\n",
       "                ],\n",
       "                [\n",
       "                    3.998390650023373,\n",
       "                    -0.6548607339452852\n",
       "                ],\n",
       "                [\n",
       "                    4.0618571682777125,\n",
       "                    -0.6056096871376666\n",
       "                ],\n",
       "                [\n",
       "                    4.1253236865320515,\n",
       "                    -0.5539200638661105\n",
       "                ],\n",
       "                [\n",
       "                    4.188790204786391,\n",
       "                    -0.4999999999999996\n",
       "                ],\n",
       "                [\n",
       "                    4.25225672304073,\n",
       "                    -0.44406661260577396\n",
       "                ],\n",
       "                [\n",
       "                    4.3157232412950695,\n",
       "                    -0.3863451256931287\n",
       "                ],\n",
       "                [\n",
       "                    4.3791897595494085,\n",
       "                    -0.3270679633174219\n",
       "                ],\n",
       "                [\n",
       "                    4.442656277803748,\n",
       "                    -0.26647381369003464\n",
       "                ],\n",
       "                [\n",
       "                    4.506122796058087,\n",
       "                    -0.20480666806519054\n",
       "                ],\n",
       "                [\n",
       "                    4.569589314312426,\n",
       "                    -0.14231483827328523\n",
       "                ],\n",
       "                [\n",
       "                    4.6330558325667655,\n",
       "                    -0.07924995685678879\n",
       "                ],\n",
       "                [\n",
       "                    4.696522350821105,\n",
       "                    -0.01586596383480761\n",
       "                ],\n",
       "                [\n",
       "                    4.759988869075444,\n",
       "                    0.04758191582374238\n",
       "                ],\n",
       "                [\n",
       "                    4.823455387329783,\n",
       "                    0.11083819990101086\n",
       "                ],\n",
       "                [\n",
       "                    4.886921905584122,\n",
       "                    0.17364817766692997\n",
       "                ],\n",
       "                [\n",
       "                    4.950388423838462,\n",
       "                    0.23575893550942748\n",
       "                ],\n",
       "                [\n",
       "                    5.013854942092801,\n",
       "                    0.2969203753282749\n",
       "                ],\n",
       "                [\n",
       "                    5.07732146034714,\n",
       "                    0.35688622159187167\n",
       "                ],\n",
       "                [\n",
       "                    5.14078797860148,\n",
       "                    0.4154150130018868\n",
       "                ],\n",
       "                [\n",
       "                    5.204254496855819,\n",
       "                    0.4722710747726829\n",
       "                ],\n",
       "                [\n",
       "                    5.267721015110158,\n",
       "                    0.5272254676105024\n",
       "                ],\n",
       "                [\n",
       "                    5.331187533364497,\n",
       "                    0.5800569095711979\n",
       "                ],\n",
       "                [\n",
       "                    5.394654051618837,\n",
       "                    0.6305526670845228\n",
       "                ],\n",
       "                [\n",
       "                    5.458120569873176,\n",
       "                    0.6785094115571323\n",
       "                ],\n",
       "                [\n",
       "                    5.521587088127515,\n",
       "                    0.7237340381050701\n",
       "                ],\n",
       "                [\n",
       "                    5.585053606381854,\n",
       "                    0.7660444431189778\n",
       "                ],\n",
       "                [\n",
       "                    5.648520124636194,\n",
       "                    0.8052702575310587\n",
       "                ],\n",
       "                [\n",
       "                    5.711986642890533,\n",
       "                    0.8412535328311812\n",
       "                ],\n",
       "                [\n",
       "                    5.775453161144872,\n",
       "                    0.8738493770697848\n",
       "                ],\n",
       "                [\n",
       "                    5.838919679399211,\n",
       "                    0.9029265382866211\n",
       "                ],\n",
       "                [\n",
       "                    5.902386197653551,\n",
       "                    0.9283679330160727\n",
       "                ],\n",
       "                [\n",
       "                    5.96585271590789,\n",
       "                    0.9500711177409454\n",
       "                ],\n",
       "                [\n",
       "                    6.029319234162229,\n",
       "                    0.9679487013963562\n",
       "                ],\n",
       "                [\n",
       "                    6.092785752416569,\n",
       "                    0.9819286972627068\n",
       "                ],\n",
       "                [\n",
       "                    6.156252270670908,\n",
       "                    0.9919548128307953\n",
       "                ],\n",
       "                [\n",
       "                    6.219718788925247,\n",
       "                    0.9979866764718844\n",
       "                ],\n",
       "                [\n",
       "                    6.283185307179586,\n",
       "                    1.0\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"sin\",\n",
       "                \"cos\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"sin\": true,\n",
       "                \"cos\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"cross\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u66f2\\u7ebf\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_147cb378070e454aa1175759954c59bb.setOption(option_147cb378070e454aa1175759954c59bb);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x28c5be53648>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Line\n",
    "import pyecharts.options as opts\n",
    "\n",
    "x=np.linspace(0,2*np.pi,100)\n",
    "y=np.sin(x)\n",
    "\n",
    "(\n",
    "   Line()\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(series_name='sin',y_axis=y,label_opts=opts.LabelOpts(is_show=False))\n",
    "    .add_yaxis(series_name='cos',y_axis=np.cos(x),label_opts=opts.LabelOpts(is_show=False))\n",
    "    .set_global_opts(title_opts=opts.TitleOpts(title='曲线'),\n",
    "                    tooltip_opts=opts.TooltipOpts(axis_pointer_type='cross')#交互，鼠标放到上面会有提示,并显示坐标\n",
    "                    )#设置全局，例如标题，副标题，跳转链接\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"60a26a1a9c074c049e9c26e567d6c143\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_60a26a1a9c074c049e9c26e567d6c143 = echarts.init(\n",
       "                    document.getElementById('60a26a1a9c074c049e9c26e567d6c143'), 'white', {renderer: 'canvas'});\n",
       "                var option_60a26a1a9c074c049e9c26e567d6c143 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"sin\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    0.0,\n",
       "                    0.0\n",
       "                ],\n",
       "                [\n",
       "                    0.06346651825433926,\n",
       "                    0.0634239196565645\n",
       "                ],\n",
       "                [\n",
       "                    0.12693303650867852,\n",
       "                    0.12659245357374926\n",
       "                ],\n",
       "                [\n",
       "                    0.1903995547630178,\n",
       "                    0.18925124436041021\n",
       "                ],\n",
       "                [\n",
       "                    0.25386607301735703,\n",
       "                    0.2511479871810792\n",
       "                ],\n",
       "                [\n",
       "                    0.3173325912716963,\n",
       "                    0.3120334456984871\n",
       "                ],\n",
       "                [\n",
       "                    0.3807991095260356,\n",
       "                    0.3716624556603276\n",
       "                ],\n",
       "                [\n",
       "                    0.4442656277803748,\n",
       "                    0.42979491208917164\n",
       "                ],\n",
       "                [\n",
       "                    0.5077321460347141,\n",
       "                    0.4861967361004687\n",
       "                ],\n",
       "                [\n",
       "                    0.5711986642890533,\n",
       "                    0.5406408174555976\n",
       "                ],\n",
       "                [\n",
       "                    0.6346651825433925,\n",
       "                    0.5929079290546404\n",
       "                ],\n",
       "                [\n",
       "                    0.6981317007977318,\n",
       "                    0.6427876096865393\n",
       "                ],\n",
       "                [\n",
       "                    0.7615982190520711,\n",
       "                    0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    0.8250647373064104,\n",
       "                    0.7345917086575333\n",
       "                ],\n",
       "                [\n",
       "                    0.8885312555607496,\n",
       "                    0.7761464642917568\n",
       "                ],\n",
       "                [\n",
       "                    0.9519977738150889,\n",
       "                    0.8145759520503357\n",
       "                ],\n",
       "                [\n",
       "                    1.0154642920694281,\n",
       "                    0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    1.0789308103237674,\n",
       "                    0.8814533634475821\n",
       "                ],\n",
       "                [\n",
       "                    1.1423973285781066,\n",
       "                    0.9096319953545183\n",
       "                ],\n",
       "                [\n",
       "                    1.2058638468324459,\n",
       "                    0.9341478602651067\n",
       "                ],\n",
       "                [\n",
       "                    1.269330365086785,\n",
       "                    0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    1.3327968833411243,\n",
       "                    0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    1.3962634015954636,\n",
       "                    0.984807753012208\n",
       "                ],\n",
       "                [\n",
       "                    1.4597299198498028,\n",
       "                    0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    1.5231964381041423,\n",
       "                    0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    1.5866629563584815,\n",
       "                    0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    1.6501294746128208,\n",
       "                    0.9968547759519424\n",
       "                ],\n",
       "                [\n",
       "                    1.71359599286716,\n",
       "                    0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    1.7770625111214993,\n",
       "                    0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    1.8405290293758385,\n",
       "                    0.963842158559942\n",
       "                ],\n",
       "                [\n",
       "                    1.9039955476301778,\n",
       "                    0.9450008187146685\n",
       "                ],\n",
       "                [\n",
       "                    1.967462065884517,\n",
       "                    0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    2.0309285841388562,\n",
       "                    0.8959937742913359\n",
       "                ],\n",
       "                [\n",
       "                    2.0943951023931957,\n",
       "                    0.8660254037844386\n",
       "                ],\n",
       "                [\n",
       "                    2.1578616206475347,\n",
       "                    0.8325698546347714\n",
       "                ],\n",
       "                [\n",
       "                    2.221328138901874,\n",
       "                    0.795761840530832\n",
       "                ],\n",
       "                [\n",
       "                    2.284794657156213,\n",
       "                    0.7557495743542583\n",
       "                ],\n",
       "                [\n",
       "                    2.3482611754105527,\n",
       "                    0.7126941713788627\n",
       "                ],\n",
       "                [\n",
       "                    2.4117276936648917,\n",
       "                    0.6667690005162916\n",
       "                ],\n",
       "                [\n",
       "                    2.475194211919231,\n",
       "                    0.6181589862206052\n",
       "                ],\n",
       "                [\n",
       "                    2.53866073017357,\n",
       "                    0.5670598638627709\n",
       "                ],\n",
       "                [\n",
       "                    2.6021272484279097,\n",
       "                    0.5136773915734063\n",
       "                ],\n",
       "                [\n",
       "                    2.6655937666822487,\n",
       "                    0.4582265217274105\n",
       "                ],\n",
       "                [\n",
       "                    2.729060284936588,\n",
       "                    0.4009305354066136\n",
       "                ],\n",
       "                [\n",
       "                    2.792526803190927,\n",
       "                    0.3420201433256689\n",
       "                ],\n",
       "                [\n",
       "                    2.8559933214452666,\n",
       "                    0.28173255684142967\n",
       "                ],\n",
       "                [\n",
       "                    2.9194598396996057,\n",
       "                    0.2203105327865408\n",
       "                ],\n",
       "                [\n",
       "                    2.982926357953945,\n",
       "                    0.1580013959733499\n",
       "                ],\n",
       "                [\n",
       "                    3.0463928762082846,\n",
       "                    0.09505604330418244\n",
       "                ],\n",
       "                [\n",
       "                    3.1098593944626236,\n",
       "                    0.031727933498067656\n",
       "                ],\n",
       "                [\n",
       "                    3.173325912716963,\n",
       "                    -0.03172793349806786\n",
       "                ],\n",
       "                [\n",
       "                    3.236792430971302,\n",
       "                    -0.09505604330418263\n",
       "                ],\n",
       "                [\n",
       "                    3.3002589492256416,\n",
       "                    -0.15800139597335008\n",
       "                ],\n",
       "                [\n",
       "                    3.3637254674799806,\n",
       "                    -0.22031053278654056\n",
       "                ],\n",
       "                [\n",
       "                    3.42719198573432,\n",
       "                    -0.28173255684142984\n",
       "                ],\n",
       "                [\n",
       "                    3.490658503988659,\n",
       "                    -0.34202014332566866\n",
       "                ],\n",
       "                [\n",
       "                    3.5541250222429985,\n",
       "                    -0.4009305354066138\n",
       "                ],\n",
       "                [\n",
       "                    3.6175915404973376,\n",
       "                    -0.4582265217274103\n",
       "                ],\n",
       "                [\n",
       "                    3.681058058751677,\n",
       "                    -0.5136773915734064\n",
       "                ],\n",
       "                [\n",
       "                    3.744524577006016,\n",
       "                    -0.5670598638627706\n",
       "                ],\n",
       "                [\n",
       "                    3.8079910952603555,\n",
       "                    -0.6181589862206053\n",
       "                ],\n",
       "                [\n",
       "                    3.8714576135146945,\n",
       "                    -0.6667690005162915\n",
       "                ],\n",
       "                [\n",
       "                    3.934924131769034,\n",
       "                    -0.7126941713788629\n",
       "                ],\n",
       "                [\n",
       "                    3.998390650023373,\n",
       "                    -0.7557495743542582\n",
       "                ],\n",
       "                [\n",
       "                    4.0618571682777125,\n",
       "                    -0.7957618405308321\n",
       "                ],\n",
       "                [\n",
       "                    4.1253236865320515,\n",
       "                    -0.8325698546347713\n",
       "                ],\n",
       "                [\n",
       "                    4.188790204786391,\n",
       "                    -0.8660254037844388\n",
       "                ],\n",
       "                [\n",
       "                    4.25225672304073,\n",
       "                    -0.895993774291336\n",
       "                ],\n",
       "                [\n",
       "                    4.3157232412950695,\n",
       "                    -0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    4.3791897595494085,\n",
       "                    -0.9450008187146683\n",
       "                ],\n",
       "                [\n",
       "                    4.442656277803748,\n",
       "                    -0.9638421585599422\n",
       "                ],\n",
       "                [\n",
       "                    4.506122796058087,\n",
       "                    -0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    4.569589314312426,\n",
       "                    -0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    4.6330558325667655,\n",
       "                    -0.9968547759519423\n",
       "                ],\n",
       "                [\n",
       "                    4.696522350821105,\n",
       "                    -0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    4.759988869075444,\n",
       "                    -0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    4.823455387329783,\n",
       "                    -0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    4.886921905584122,\n",
       "                    -0.9848077530122081\n",
       "                ],\n",
       "                [\n",
       "                    4.950388423838462,\n",
       "                    -0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    5.013854942092801,\n",
       "                    -0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    5.07732146034714,\n",
       "                    -0.9341478602651068\n",
       "                ],\n",
       "                [\n",
       "                    5.14078797860148,\n",
       "                    -0.9096319953545182\n",
       "                ],\n",
       "                [\n",
       "                    5.204254496855819,\n",
       "                    -0.881453363447582\n",
       "                ],\n",
       "                [\n",
       "                    5.267721015110158,\n",
       "                    -0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    5.331187533364497,\n",
       "                    -0.8145759520503358\n",
       "                ],\n",
       "                [\n",
       "                    5.394654051618837,\n",
       "                    -0.7761464642917566\n",
       "                ],\n",
       "                [\n",
       "                    5.458120569873176,\n",
       "                    -0.7345917086575331\n",
       "                ],\n",
       "                [\n",
       "                    5.521587088127515,\n",
       "                    -0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    5.585053606381854,\n",
       "                    -0.6427876096865396\n",
       "                ],\n",
       "                [\n",
       "                    5.648520124636194,\n",
       "                    -0.5929079290546402\n",
       "                ],\n",
       "                [\n",
       "                    5.711986642890533,\n",
       "                    -0.5406408174555974\n",
       "                ],\n",
       "                [\n",
       "                    5.775453161144872,\n",
       "                    -0.4861967361004688\n",
       "                ],\n",
       "                [\n",
       "                    5.838919679399211,\n",
       "                    -0.4297949120891719\n",
       "                ],\n",
       "                [\n",
       "                    5.902386197653551,\n",
       "                    -0.37166245566032724\n",
       "                ],\n",
       "                [\n",
       "                    5.96585271590789,\n",
       "                    -0.31203344569848707\n",
       "                ],\n",
       "                [\n",
       "                    6.029319234162229,\n",
       "                    -0.2511479871810794\n",
       "                ],\n",
       "                [\n",
       "                    6.092785752416569,\n",
       "                    -0.18925124436040974\n",
       "                ],\n",
       "                [\n",
       "                    6.156252270670908,\n",
       "                    -0.12659245357374904\n",
       "                ],\n",
       "                [\n",
       "                    6.219718788925247,\n",
       "                    -0.06342391965656452\n",
       "                ],\n",
       "                [\n",
       "                    6.283185307179586,\n",
       "                    -2.4492935982947064e-16\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"cos\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    0.0,\n",
       "                    1.0\n",
       "                ],\n",
       "                [\n",
       "                    0.06346651825433926,\n",
       "                    0.9979866764718844\n",
       "                ],\n",
       "                [\n",
       "                    0.12693303650867852,\n",
       "                    0.9919548128307953\n",
       "                ],\n",
       "                [\n",
       "                    0.1903995547630178,\n",
       "                    0.9819286972627067\n",
       "                ],\n",
       "                [\n",
       "                    0.25386607301735703,\n",
       "                    0.9679487013963562\n",
       "                ],\n",
       "                [\n",
       "                    0.3173325912716963,\n",
       "                    0.9500711177409454\n",
       "                ],\n",
       "                [\n",
       "                    0.3807991095260356,\n",
       "                    0.9283679330160726\n",
       "                ],\n",
       "                [\n",
       "                    0.4442656277803748,\n",
       "                    0.9029265382866212\n",
       "                ],\n",
       "                [\n",
       "                    0.5077321460347141,\n",
       "                    0.8738493770697849\n",
       "                ],\n",
       "                [\n",
       "                    0.5711986642890533,\n",
       "                    0.8412535328311812\n",
       "                ],\n",
       "                [\n",
       "                    0.6346651825433925,\n",
       "                    0.8052702575310586\n",
       "                ],\n",
       "                [\n",
       "                    0.6981317007977318,\n",
       "                    0.766044443118978\n",
       "                ],\n",
       "                [\n",
       "                    0.7615982190520711,\n",
       "                    0.7237340381050702\n",
       "                ],\n",
       "                [\n",
       "                    0.8250647373064104,\n",
       "                    0.6785094115571322\n",
       "                ],\n",
       "                [\n",
       "                    0.8885312555607496,\n",
       "                    0.6305526670845225\n",
       "                ],\n",
       "                [\n",
       "                    0.9519977738150889,\n",
       "                    0.5800569095711982\n",
       "                ],\n",
       "                [\n",
       "                    1.0154642920694281,\n",
       "                    0.5272254676105024\n",
       "                ],\n",
       "                [\n",
       "                    1.0789308103237674,\n",
       "                    0.4722710747726827\n",
       "                ],\n",
       "                [\n",
       "                    1.1423973285781066,\n",
       "                    0.41541501300188644\n",
       "                ],\n",
       "                [\n",
       "                    1.2058638468324459,\n",
       "                    0.3568862215918719\n",
       "                ],\n",
       "                [\n",
       "                    1.269330365086785,\n",
       "                    0.2969203753282749\n",
       "                ],\n",
       "                [\n",
       "                    1.3327968833411243,\n",
       "                    0.23575893550942728\n",
       "                ],\n",
       "                [\n",
       "                    1.3962634015954636,\n",
       "                    0.17364817766693041\n",
       "                ],\n",
       "                [\n",
       "                    1.4597299198498028,\n",
       "                    0.1108381999010111\n",
       "                ],\n",
       "                [\n",
       "                    1.5231964381041423,\n",
       "                    0.04758191582374218\n",
       "                ],\n",
       "                [\n",
       "                    1.5866629563584815,\n",
       "                    -0.01586596383480803\n",
       "                ],\n",
       "                [\n",
       "                    1.6501294746128208,\n",
       "                    -0.07924995685678854\n",
       "                ],\n",
       "                [\n",
       "                    1.71359599286716,\n",
       "                    -0.14231483827328523\n",
       "                ],\n",
       "                [\n",
       "                    1.7770625111214993,\n",
       "                    -0.20480666806519074\n",
       "                ],\n",
       "                [\n",
       "                    1.8405290293758385,\n",
       "                    -0.26647381369003503\n",
       "                ],\n",
       "                [\n",
       "                    1.9039955476301778,\n",
       "                    -0.32706796331742166\n",
       "                ],\n",
       "                [\n",
       "                    1.967462065884517,\n",
       "                    -0.3863451256931287\n",
       "                ],\n",
       "                [\n",
       "                    2.0309285841388562,\n",
       "                    -0.4440666126057741\n",
       "                ],\n",
       "                [\n",
       "                    2.0943951023931957,\n",
       "                    -0.5000000000000002\n",
       "                ],\n",
       "                [\n",
       "                    2.1578616206475347,\n",
       "                    -0.5539200638661103\n",
       "                ],\n",
       "                [\n",
       "                    2.221328138901874,\n",
       "                    -0.6056096871376668\n",
       "                ],\n",
       "                [\n",
       "                    2.284794657156213,\n",
       "                    -0.654860733945285\n",
       "                ],\n",
       "                [\n",
       "                    2.3482611754105527,\n",
       "                    -0.7014748877063214\n",
       "                ],\n",
       "                [\n",
       "                    2.4117276936648917,\n",
       "                    -0.7452644496757547\n",
       "                ],\n",
       "                [\n",
       "                    2.475194211919231,\n",
       "                    -0.7860530947427875\n",
       "                ],\n",
       "                [\n",
       "                    2.53866073017357,\n",
       "                    -0.8236765814298327\n",
       "                ],\n",
       "                [\n",
       "                    2.6021272484279097,\n",
       "                    -0.8579834132349771\n",
       "                ],\n",
       "                [\n",
       "                    2.6655937666822487,\n",
       "                    -0.8888354486549234\n",
       "                ],\n",
       "                [\n",
       "                    2.729060284936588,\n",
       "                    -0.9161084574320696\n",
       "                ],\n",
       "                [\n",
       "                    2.792526803190927,\n",
       "                    -0.9396926207859083\n",
       "                ],\n",
       "                [\n",
       "                    2.8559933214452666,\n",
       "                    -0.9594929736144974\n",
       "                ],\n",
       "                [\n",
       "                    2.9194598396996057,\n",
       "                    -0.975429786885407\n",
       "                ],\n",
       "                [\n",
       "                    2.982926357953945,\n",
       "                    -0.9874388886763943\n",
       "                ],\n",
       "                [\n",
       "                    3.0463928762082846,\n",
       "                    -0.9954719225730846\n",
       "                ],\n",
       "                [\n",
       "                    3.1098593944626236,\n",
       "                    -0.9994965423831851\n",
       "                ],\n",
       "                [\n",
       "                    3.173325912716963,\n",
       "                    -0.9994965423831851\n",
       "                ],\n",
       "                [\n",
       "                    3.236792430971302,\n",
       "                    -0.9954719225730846\n",
       "                ],\n",
       "                [\n",
       "                    3.3002589492256416,\n",
       "                    -0.9874388886763943\n",
       "                ],\n",
       "                [\n",
       "                    3.3637254674799806,\n",
       "                    -0.975429786885407\n",
       "                ],\n",
       "                [\n",
       "                    3.42719198573432,\n",
       "                    -0.9594929736144974\n",
       "                ],\n",
       "                [\n",
       "                    3.490658503988659,\n",
       "                    -0.9396926207859084\n",
       "                ],\n",
       "                [\n",
       "                    3.5541250222429985,\n",
       "                    -0.9161084574320696\n",
       "                ],\n",
       "                [\n",
       "                    3.6175915404973376,\n",
       "                    -0.8888354486549235\n",
       "                ],\n",
       "                [\n",
       "                    3.681058058751677,\n",
       "                    -0.857983413234977\n",
       "                ],\n",
       "                [\n",
       "                    3.744524577006016,\n",
       "                    -0.8236765814298328\n",
       "                ],\n",
       "                [\n",
       "                    3.8079910952603555,\n",
       "                    -0.7860530947427874\n",
       "                ],\n",
       "                [\n",
       "                    3.8714576135146945,\n",
       "                    -0.7452644496757548\n",
       "                ],\n",
       "                [\n",
       "                    3.934924131769034,\n",
       "                    -0.7014748877063213\n",
       "                ],\n",
       "                [\n",
       "                    3.998390650023373,\n",
       "                    -0.6548607339452852\n",
       "                ],\n",
       "                [\n",
       "                    4.0618571682777125,\n",
       "                    -0.6056096871376666\n",
       "                ],\n",
       "                [\n",
       "                    4.1253236865320515,\n",
       "                    -0.5539200638661105\n",
       "                ],\n",
       "                [\n",
       "                    4.188790204786391,\n",
       "                    -0.4999999999999996\n",
       "                ],\n",
       "                [\n",
       "                    4.25225672304073,\n",
       "                    -0.44406661260577396\n",
       "                ],\n",
       "                [\n",
       "                    4.3157232412950695,\n",
       "                    -0.3863451256931287\n",
       "                ],\n",
       "                [\n",
       "                    4.3791897595494085,\n",
       "                    -0.3270679633174219\n",
       "                ],\n",
       "                [\n",
       "                    4.442656277803748,\n",
       "                    -0.26647381369003464\n",
       "                ],\n",
       "                [\n",
       "                    4.506122796058087,\n",
       "                    -0.20480666806519054\n",
       "                ],\n",
       "                [\n",
       "                    4.569589314312426,\n",
       "                    -0.14231483827328523\n",
       "                ],\n",
       "                [\n",
       "                    4.6330558325667655,\n",
       "                    -0.07924995685678879\n",
       "                ],\n",
       "                [\n",
       "                    4.696522350821105,\n",
       "                    -0.01586596383480761\n",
       "                ],\n",
       "                [\n",
       "                    4.759988869075444,\n",
       "                    0.04758191582374238\n",
       "                ],\n",
       "                [\n",
       "                    4.823455387329783,\n",
       "                    0.11083819990101086\n",
       "                ],\n",
       "                [\n",
       "                    4.886921905584122,\n",
       "                    0.17364817766692997\n",
       "                ],\n",
       "                [\n",
       "                    4.950388423838462,\n",
       "                    0.23575893550942748\n",
       "                ],\n",
       "                [\n",
       "                    5.013854942092801,\n",
       "                    0.2969203753282749\n",
       "                ],\n",
       "                [\n",
       "                    5.07732146034714,\n",
       "                    0.35688622159187167\n",
       "                ],\n",
       "                [\n",
       "                    5.14078797860148,\n",
       "                    0.4154150130018868\n",
       "                ],\n",
       "                [\n",
       "                    5.204254496855819,\n",
       "                    0.4722710747726829\n",
       "                ],\n",
       "                [\n",
       "                    5.267721015110158,\n",
       "                    0.5272254676105024\n",
       "                ],\n",
       "                [\n",
       "                    5.331187533364497,\n",
       "                    0.5800569095711979\n",
       "                ],\n",
       "                [\n",
       "                    5.394654051618837,\n",
       "                    0.6305526670845228\n",
       "                ],\n",
       "                [\n",
       "                    5.458120569873176,\n",
       "                    0.6785094115571323\n",
       "                ],\n",
       "                [\n",
       "                    5.521587088127515,\n",
       "                    0.7237340381050701\n",
       "                ],\n",
       "                [\n",
       "                    5.585053606381854,\n",
       "                    0.7660444431189778\n",
       "                ],\n",
       "                [\n",
       "                    5.648520124636194,\n",
       "                    0.8052702575310587\n",
       "                ],\n",
       "                [\n",
       "                    5.711986642890533,\n",
       "                    0.8412535328311812\n",
       "                ],\n",
       "                [\n",
       "                    5.775453161144872,\n",
       "                    0.8738493770697848\n",
       "                ],\n",
       "                [\n",
       "                    5.838919679399211,\n",
       "                    0.9029265382866211\n",
       "                ],\n",
       "                [\n",
       "                    5.902386197653551,\n",
       "                    0.9283679330160727\n",
       "                ],\n",
       "                [\n",
       "                    5.96585271590789,\n",
       "                    0.9500711177409454\n",
       "                ],\n",
       "                [\n",
       "                    6.029319234162229,\n",
       "                    0.9679487013963562\n",
       "                ],\n",
       "                [\n",
       "                    6.092785752416569,\n",
       "                    0.9819286972627068\n",
       "                ],\n",
       "                [\n",
       "                    6.156252270670908,\n",
       "                    0.9919548128307953\n",
       "                ],\n",
       "                [\n",
       "                    6.219718788925247,\n",
       "                    0.9979866764718844\n",
       "                ],\n",
       "                [\n",
       "                    6.283185307179586,\n",
       "                    1.0\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"sin\",\n",
       "                \"cos\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"sin\": true,\n",
       "                \"cos\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"cross\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u66f2\\u7ebf\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_60a26a1a9c074c049e9c26e567d6c143.setOption(option_60a26a1a9c074c049e9c26e567d6c143);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x24e70dc0ec8>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Line\n",
    "import pyecharts.options as opts\n",
    "\n",
    "x=np.linspace(0,2*np.pi,100)\n",
    "y=np.sin(x)\n",
    "\n",
    "(\n",
    "   Line(init_opts=opts.InitOpts(width='720px',height='320px'))\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(series_name='sin',y_axis=y,label_opts=opts.LabelOpts(is_show=False))\n",
    "    .add_yaxis(series_name='cos',y_axis=np.cos(x),label_opts=opts.LabelOpts(is_show=False))\n",
    "    .set_global_opts(title_opts=opts.TitleOpts(title='曲线'),\n",
    "                    tooltip_opts=opts.TooltipOpts(axis_pointer_type='cross')#交互，鼠标放到上面会有提示,并显示坐标\n",
    "                    )#设置全局，例如标题，副标题，跳转链接\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"bfd353f2d7824fa4a84de1ec1939f849\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_bfd353f2d7824fa4a84de1ec1939f849 = echarts.init(\n",
       "                    document.getElementById('bfd353f2d7824fa4a84de1ec1939f849'), 'white', {renderer: 'canvas'});\n",
       "                var option_bfd353f2d7824fa4a84de1ec1939f849 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u54c8\\u58eb\\u5947\",\n",
       "                    \"value\": 110\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8428\\u6469\\u8036\",\n",
       "                    \"value\": 136\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cf0\\u8fea\",\n",
       "                    \"value\": 108\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91d1\\u6bdb\",\n",
       "                    \"value\": 48\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7267\\u7f8a\\u72ac\",\n",
       "                    \"value\": 111\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u5a03\\u5a03\",\n",
       "                    \"value\": 112\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u67ef\\u57fa\",\n",
       "                    \"value\": 103\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"0%\",\n",
       "                \"75%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u54c8\\u58eb\\u5947\",\n",
       "                \"\\u8428\\u6469\\u8036\",\n",
       "                \"\\u6cf0\\u8fea\",\n",
       "                \"\\u91d1\\u6bdb\",\n",
       "                \"\\u7267\\u7f8a\\u72ac\",\n",
       "                \"\\u5409\\u5a03\\u5a03\",\n",
       "                \"\\u67ef\\u57fa\"\n",
       "            ],\n",
       "            \"selected\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    }\n",
       "};\n",
       "                chart_bfd353f2d7824fa4a84de1ec1939f849.setOption(option_bfd353f2d7824fa4a84de1ec1939f849);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x1eab189ce08>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Pie\n",
    "import pyecharts.options as opts\n",
    "\n",
    "num=[110,136,108,48,111,112,103]\n",
    "lab=['哈士奇','萨摩耶','泰迪','金毛','牧羊犬','吉娃娃','柯基']\n",
    "(\n",
    "      Pie(init_opts=opts.InitOpts(width='720px',height='320px'))#画布大小\n",
    "    .add(series_name='',data_pair=[(j,i)for i,j in zip(num,lab)])\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"fe6f6aa41d0f421984de9867d780d71d\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_fe6f6aa41d0f421984de9867d780d71d = echarts.init(\n",
       "                    document.getElementById('fe6f6aa41d0f421984de9867d780d71d'), 'white', {renderer: 'canvas'});\n",
       "                var option_fe6f6aa41d0f421984de9867d780d71d = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u54c8\\u58eb\\u5947\",\n",
       "                    \"value\": 110\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8428\\u6469\\u8036\",\n",
       "                    \"value\": 136\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cf0\\u8fea\",\n",
       "                    \"value\": 108\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91d1\\u6bdb\",\n",
       "                    \"value\": 48\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7267\\u7f8a\\u72ac\",\n",
       "                    \"value\": 111\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u5a03\\u5a03\",\n",
       "                    \"value\": 112\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u67ef\\u57fa\",\n",
       "                    \"value\": 103\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"40%\",\n",
       "                \"75%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u54c8\\u58eb\\u5947\",\n",
       "                \"\\u8428\\u6469\\u8036\",\n",
       "                \"\\u6cf0\\u8fea\",\n",
       "                \"\\u91d1\\u6bdb\",\n",
       "                \"\\u7267\\u7f8a\\u72ac\",\n",
       "                \"\\u5409\\u5a03\\u5a03\",\n",
       "                \"\\u67ef\\u57fa\"\n",
       "            ],\n",
       "            \"selected\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    }\n",
       "};\n",
       "                chart_fe6f6aa41d0f421984de9867d780d71d.setOption(option_fe6f6aa41d0f421984de9867d780d71d);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x24e72631c08>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Pie\n",
    "import pyecharts.options as opts\n",
    "\n",
    "num=[110,136,108,48,111,112,103]\n",
    "lab=['哈士奇','萨摩耶','泰迪','金毛','牧羊犬','吉娃娃','柯基']\n",
    "(\n",
    "      Pie(init_opts=opts.InitOpts(width='720px',height='320px'))#画布大小\n",
    "    .add(series_name='',data_pair=[(j,i)for i,j in zip(num,lab)],radius=['40%','75%'])#radius设置内半径和外半径\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"2904a98484c344eca3256922886eb647\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_2904a98484c344eca3256922886eb647 = echarts.init(\n",
       "                    document.getElementById('2904a98484c344eca3256922886eb647'), 'white', {renderer: 'canvas'});\n",
       "                var option_2904a98484c344eca3256922886eb647 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u54c8\\u58eb\\u5947\",\n",
       "                    \"value\": 110\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8428\\u6469\\u8036\",\n",
       "                    \"value\": 136\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cf0\\u8fea\",\n",
       "                    \"value\": 108\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91d1\\u6bdb\",\n",
       "                    \"value\": 48\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7267\\u7f8a\\u72ac\",\n",
       "                    \"value\": 111\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u5a03\\u5a03\",\n",
       "                    \"value\": 112\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u67ef\\u57fa\",\n",
       "                    \"value\": 103\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"0%\",\n",
       "                \"75%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"roseType\": \"radius\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u54c8\\u58eb\\u5947\",\n",
       "                \"\\u8428\\u6469\\u8036\",\n",
       "                \"\\u6cf0\\u8fea\",\n",
       "                \"\\u91d1\\u6bdb\",\n",
       "                \"\\u7267\\u7f8a\\u72ac\",\n",
       "                \"\\u5409\\u5a03\\u5a03\",\n",
       "                \"\\u67ef\\u57fa\"\n",
       "            ],\n",
       "            \"selected\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    }\n",
       "};\n",
       "                chart_2904a98484c344eca3256922886eb647.setOption(option_2904a98484c344eca3256922886eb647);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2893cea0d08>"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Pie\n",
    "import pyecharts.options as opts\n",
    "\n",
    "num=[110,136,108,48,111,112,103]\n",
    "lab=['哈士奇','萨摩耶','泰迪','金毛','牧羊犬','吉娃娃','柯基']\n",
    "(\n",
    "      Pie(init_opts=opts.InitOpts(width='720px',height='320px'))#画布大小\n",
    "    .add(series_name='',data_pair=[(j,i)for i,j in zip(num,lab)],rosetype='radius')#用半径大小表示大小\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"81ca7576049f4f6f84938e1c1c130057\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_81ca7576049f4f6f84938e1c1c130057 = echarts.init(\n",
       "                    document.getElementById('81ca7576049f4f6f84938e1c1c130057'), 'white', {renderer: 'canvas'});\n",
       "                var option_81ca7576049f4f6f84938e1c1c130057 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u5546\\u5bb6A\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                110,\n",
       "                136,\n",
       "                108,\n",
       "                48,\n",
       "                111,\n",
       "                112,\n",
       "                103\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u5546\\u5bb6B\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                90,\n",
       "                110,\n",
       "                101,\n",
       "                70,\n",
       "                90,\n",
       "                120,\n",
       "                99\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u5546\\u5bb6A\",\n",
       "                \"\\u5546\\u5bb6B\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u5546\\u5bb6A\": true,\n",
       "                \"\\u5546\\u5bb6B\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                110,\n",
       "                136,\n",
       "                108,\n",
       "                48,\n",
       "                111,\n",
       "                112,\n",
       "                103\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5404\\u4e2a\\u5546\\u5bb6\\u62e5\\u6709\\u72ac\\u7c7b\\u6570\\u636e\\u60c5\\u51b5\",\n",
       "            \"subtext\": \"\\u5982\\u6709\\u96f7\\u540c\\uff0c\\u7eaf\\u5c5e\\u5de7\\u5408\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_81ca7576049f4f6f84938e1c1c130057.setOption(option_81ca7576049f4f6f84938e1c1c130057);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x1ed2d034408>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Bar\n",
    "import pyecharts.options as opts\n",
    "\n",
    "num=[110,136,108,48,111,112,103]\n",
    "num2=[90,110,101,70,90,120,99]\n",
    "lab=['哈士奇','萨摩耶','泰迪','金毛','牧羊犬','吉娃娃','柯基']\n",
    "(\n",
    "      Bar(init_opts=opts.InitOpts(width='720px',height='320px'))#画布大小\n",
    "      .add_xaxis(xaxis_data=num)\n",
    "      .add_yaxis(series_name='商家A',y_axis=num)\n",
    "      .add_yaxis(series_name='商家B',y_axis=num2)\n",
    "      .set_global_opts(title_opts=opts.TitleOpts(title='各个商家拥有犬类数据情况',\n",
    "                                                subtitle='如有雷同，纯属巧合'))\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n",
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n",
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\composite_charts\\grid.py:17: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"27e3408130f1452b9ef377c8964e2b6d\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_27e3408130f1452b9ef377c8964e2b6d = echarts.init(\n",
       "                    document.getElementById('27e3408130f1452b9ef377c8964e2b6d'), 'white', {renderer: 'canvas'});\n",
       "                var option_27e3408130f1452b9ef377c8964e2b6d = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"scatter\",\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"symbolSize\": 10,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    0.0,\n",
       "                    0.0\n",
       "                ],\n",
       "                [\n",
       "                    0.06346651825433926,\n",
       "                    0.0634239196565645\n",
       "                ],\n",
       "                [\n",
       "                    0.12693303650867852,\n",
       "                    0.12659245357374926\n",
       "                ],\n",
       "                [\n",
       "                    0.1903995547630178,\n",
       "                    0.18925124436041021\n",
       "                ],\n",
       "                [\n",
       "                    0.25386607301735703,\n",
       "                    0.2511479871810792\n",
       "                ],\n",
       "                [\n",
       "                    0.3173325912716963,\n",
       "                    0.3120334456984871\n",
       "                ],\n",
       "                [\n",
       "                    0.3807991095260356,\n",
       "                    0.3716624556603276\n",
       "                ],\n",
       "                [\n",
       "                    0.4442656277803748,\n",
       "                    0.42979491208917164\n",
       "                ],\n",
       "                [\n",
       "                    0.5077321460347141,\n",
       "                    0.4861967361004687\n",
       "                ],\n",
       "                [\n",
       "                    0.5711986642890533,\n",
       "                    0.5406408174555976\n",
       "                ],\n",
       "                [\n",
       "                    0.6346651825433925,\n",
       "                    0.5929079290546404\n",
       "                ],\n",
       "                [\n",
       "                    0.6981317007977318,\n",
       "                    0.6427876096865393\n",
       "                ],\n",
       "                [\n",
       "                    0.7615982190520711,\n",
       "                    0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    0.8250647373064104,\n",
       "                    0.7345917086575333\n",
       "                ],\n",
       "                [\n",
       "                    0.8885312555607496,\n",
       "                    0.7761464642917568\n",
       "                ],\n",
       "                [\n",
       "                    0.9519977738150889,\n",
       "                    0.8145759520503357\n",
       "                ],\n",
       "                [\n",
       "                    1.0154642920694281,\n",
       "                    0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    1.0789308103237674,\n",
       "                    0.8814533634475821\n",
       "                ],\n",
       "                [\n",
       "                    1.1423973285781066,\n",
       "                    0.9096319953545183\n",
       "                ],\n",
       "                [\n",
       "                    1.2058638468324459,\n",
       "                    0.9341478602651067\n",
       "                ],\n",
       "                [\n",
       "                    1.269330365086785,\n",
       "                    0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    1.3327968833411243,\n",
       "                    0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    1.3962634015954636,\n",
       "                    0.984807753012208\n",
       "                ],\n",
       "                [\n",
       "                    1.4597299198498028,\n",
       "                    0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    1.5231964381041423,\n",
       "                    0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    1.5866629563584815,\n",
       "                    0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    1.6501294746128208,\n",
       "                    0.9968547759519424\n",
       "                ],\n",
       "                [\n",
       "                    1.71359599286716,\n",
       "                    0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    1.7770625111214993,\n",
       "                    0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    1.8405290293758385,\n",
       "                    0.963842158559942\n",
       "                ],\n",
       "                [\n",
       "                    1.9039955476301778,\n",
       "                    0.9450008187146685\n",
       "                ],\n",
       "                [\n",
       "                    1.967462065884517,\n",
       "                    0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    2.0309285841388562,\n",
       "                    0.8959937742913359\n",
       "                ],\n",
       "                [\n",
       "                    2.0943951023931957,\n",
       "                    0.8660254037844386\n",
       "                ],\n",
       "                [\n",
       "                    2.1578616206475347,\n",
       "                    0.8325698546347714\n",
       "                ],\n",
       "                [\n",
       "                    2.221328138901874,\n",
       "                    0.795761840530832\n",
       "                ],\n",
       "                [\n",
       "                    2.284794657156213,\n",
       "                    0.7557495743542583\n",
       "                ],\n",
       "                [\n",
       "                    2.3482611754105527,\n",
       "                    0.7126941713788627\n",
       "                ],\n",
       "                [\n",
       "                    2.4117276936648917,\n",
       "                    0.6667690005162916\n",
       "                ],\n",
       "                [\n",
       "                    2.475194211919231,\n",
       "                    0.6181589862206052\n",
       "                ],\n",
       "                [\n",
       "                    2.53866073017357,\n",
       "                    0.5670598638627709\n",
       "                ],\n",
       "                [\n",
       "                    2.6021272484279097,\n",
       "                    0.5136773915734063\n",
       "                ],\n",
       "                [\n",
       "                    2.6655937666822487,\n",
       "                    0.4582265217274105\n",
       "                ],\n",
       "                [\n",
       "                    2.729060284936588,\n",
       "                    0.4009305354066136\n",
       "                ],\n",
       "                [\n",
       "                    2.792526803190927,\n",
       "                    0.3420201433256689\n",
       "                ],\n",
       "                [\n",
       "                    2.8559933214452666,\n",
       "                    0.28173255684142967\n",
       "                ],\n",
       "                [\n",
       "                    2.9194598396996057,\n",
       "                    0.2203105327865408\n",
       "                ],\n",
       "                [\n",
       "                    2.982926357953945,\n",
       "                    0.1580013959733499\n",
       "                ],\n",
       "                [\n",
       "                    3.0463928762082846,\n",
       "                    0.09505604330418244\n",
       "                ],\n",
       "                [\n",
       "                    3.1098593944626236,\n",
       "                    0.031727933498067656\n",
       "                ],\n",
       "                [\n",
       "                    3.173325912716963,\n",
       "                    -0.03172793349806786\n",
       "                ],\n",
       "                [\n",
       "                    3.236792430971302,\n",
       "                    -0.09505604330418263\n",
       "                ],\n",
       "                [\n",
       "                    3.3002589492256416,\n",
       "                    -0.15800139597335008\n",
       "                ],\n",
       "                [\n",
       "                    3.3637254674799806,\n",
       "                    -0.22031053278654056\n",
       "                ],\n",
       "                [\n",
       "                    3.42719198573432,\n",
       "                    -0.28173255684142984\n",
       "                ],\n",
       "                [\n",
       "                    3.490658503988659,\n",
       "                    -0.34202014332566866\n",
       "                ],\n",
       "                [\n",
       "                    3.5541250222429985,\n",
       "                    -0.4009305354066138\n",
       "                ],\n",
       "                [\n",
       "                    3.6175915404973376,\n",
       "                    -0.4582265217274103\n",
       "                ],\n",
       "                [\n",
       "                    3.681058058751677,\n",
       "                    -0.5136773915734064\n",
       "                ],\n",
       "                [\n",
       "                    3.744524577006016,\n",
       "                    -0.5670598638627706\n",
       "                ],\n",
       "                [\n",
       "                    3.8079910952603555,\n",
       "                    -0.6181589862206053\n",
       "                ],\n",
       "                [\n",
       "                    3.8714576135146945,\n",
       "                    -0.6667690005162915\n",
       "                ],\n",
       "                [\n",
       "                    3.934924131769034,\n",
       "                    -0.7126941713788629\n",
       "                ],\n",
       "                [\n",
       "                    3.998390650023373,\n",
       "                    -0.7557495743542582\n",
       "                ],\n",
       "                [\n",
       "                    4.0618571682777125,\n",
       "                    -0.7957618405308321\n",
       "                ],\n",
       "                [\n",
       "                    4.1253236865320515,\n",
       "                    -0.8325698546347713\n",
       "                ],\n",
       "                [\n",
       "                    4.188790204786391,\n",
       "                    -0.8660254037844388\n",
       "                ],\n",
       "                [\n",
       "                    4.25225672304073,\n",
       "                    -0.895993774291336\n",
       "                ],\n",
       "                [\n",
       "                    4.3157232412950695,\n",
       "                    -0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    4.3791897595494085,\n",
       "                    -0.9450008187146683\n",
       "                ],\n",
       "                [\n",
       "                    4.442656277803748,\n",
       "                    -0.9638421585599422\n",
       "                ],\n",
       "                [\n",
       "                    4.506122796058087,\n",
       "                    -0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    4.569589314312426,\n",
       "                    -0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    4.6330558325667655,\n",
       "                    -0.9968547759519423\n",
       "                ],\n",
       "                [\n",
       "                    4.696522350821105,\n",
       "                    -0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    4.759988869075444,\n",
       "                    -0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    4.823455387329783,\n",
       "                    -0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    4.886921905584122,\n",
       "                    -0.9848077530122081\n",
       "                ],\n",
       "                [\n",
       "                    4.950388423838462,\n",
       "                    -0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    5.013854942092801,\n",
       "                    -0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    5.07732146034714,\n",
       "                    -0.9341478602651068\n",
       "                ],\n",
       "                [\n",
       "                    5.14078797860148,\n",
       "                    -0.9096319953545182\n",
       "                ],\n",
       "                [\n",
       "                    5.204254496855819,\n",
       "                    -0.881453363447582\n",
       "                ],\n",
       "                [\n",
       "                    5.267721015110158,\n",
       "                    -0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    5.331187533364497,\n",
       "                    -0.8145759520503358\n",
       "                ],\n",
       "                [\n",
       "                    5.394654051618837,\n",
       "                    -0.7761464642917566\n",
       "                ],\n",
       "                [\n",
       "                    5.458120569873176,\n",
       "                    -0.7345917086575331\n",
       "                ],\n",
       "                [\n",
       "                    5.521587088127515,\n",
       "                    -0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    5.585053606381854,\n",
       "                    -0.6427876096865396\n",
       "                ],\n",
       "                [\n",
       "                    5.648520124636194,\n",
       "                    -0.5929079290546402\n",
       "                ],\n",
       "                [\n",
       "                    5.711986642890533,\n",
       "                    -0.5406408174555974\n",
       "                ],\n",
       "                [\n",
       "                    5.775453161144872,\n",
       "                    -0.4861967361004688\n",
       "                ],\n",
       "                [\n",
       "                    5.838919679399211,\n",
       "                    -0.4297949120891719\n",
       "                ],\n",
       "                [\n",
       "                    5.902386197653551,\n",
       "                    -0.37166245566032724\n",
       "                ],\n",
       "                [\n",
       "                    5.96585271590789,\n",
       "                    -0.31203344569848707\n",
       "                ],\n",
       "                [\n",
       "                    6.029319234162229,\n",
       "                    -0.2511479871810794\n",
       "                ],\n",
       "                [\n",
       "                    6.092785752416569,\n",
       "                    -0.18925124436040974\n",
       "                ],\n",
       "                [\n",
       "                    6.156252270670908,\n",
       "                    -0.12659245357374904\n",
       "                ],\n",
       "                [\n",
       "                    6.219718788925247,\n",
       "                    -0.06342391965656452\n",
       "                ],\n",
       "                [\n",
       "                    6.283185307179586,\n",
       "                    -2.4492935982947064e-16\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 1,\n",
       "            \"yAxisIndex\": 1,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    0.0,\n",
       "                    0.0\n",
       "                ],\n",
       "                [\n",
       "                    0.06346651825433926,\n",
       "                    0.0634239196565645\n",
       "                ],\n",
       "                [\n",
       "                    0.12693303650867852,\n",
       "                    0.12659245357374926\n",
       "                ],\n",
       "                [\n",
       "                    0.1903995547630178,\n",
       "                    0.18925124436041021\n",
       "                ],\n",
       "                [\n",
       "                    0.25386607301735703,\n",
       "                    0.2511479871810792\n",
       "                ],\n",
       "                [\n",
       "                    0.3173325912716963,\n",
       "                    0.3120334456984871\n",
       "                ],\n",
       "                [\n",
       "                    0.3807991095260356,\n",
       "                    0.3716624556603276\n",
       "                ],\n",
       "                [\n",
       "                    0.4442656277803748,\n",
       "                    0.42979491208917164\n",
       "                ],\n",
       "                [\n",
       "                    0.5077321460347141,\n",
       "                    0.4861967361004687\n",
       "                ],\n",
       "                [\n",
       "                    0.5711986642890533,\n",
       "                    0.5406408174555976\n",
       "                ],\n",
       "                [\n",
       "                    0.6346651825433925,\n",
       "                    0.5929079290546404\n",
       "                ],\n",
       "                [\n",
       "                    0.6981317007977318,\n",
       "                    0.6427876096865393\n",
       "                ],\n",
       "                [\n",
       "                    0.7615982190520711,\n",
       "                    0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    0.8250647373064104,\n",
       "                    0.7345917086575333\n",
       "                ],\n",
       "                [\n",
       "                    0.8885312555607496,\n",
       "                    0.7761464642917568\n",
       "                ],\n",
       "                [\n",
       "                    0.9519977738150889,\n",
       "                    0.8145759520503357\n",
       "                ],\n",
       "                [\n",
       "                    1.0154642920694281,\n",
       "                    0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    1.0789308103237674,\n",
       "                    0.8814533634475821\n",
       "                ],\n",
       "                [\n",
       "                    1.1423973285781066,\n",
       "                    0.9096319953545183\n",
       "                ],\n",
       "                [\n",
       "                    1.2058638468324459,\n",
       "                    0.9341478602651067\n",
       "                ],\n",
       "                [\n",
       "                    1.269330365086785,\n",
       "                    0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    1.3327968833411243,\n",
       "                    0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    1.3962634015954636,\n",
       "                    0.984807753012208\n",
       "                ],\n",
       "                [\n",
       "                    1.4597299198498028,\n",
       "                    0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    1.5231964381041423,\n",
       "                    0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    1.5866629563584815,\n",
       "                    0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    1.6501294746128208,\n",
       "                    0.9968547759519424\n",
       "                ],\n",
       "                [\n",
       "                    1.71359599286716,\n",
       "                    0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    1.7770625111214993,\n",
       "                    0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    1.8405290293758385,\n",
       "                    0.963842158559942\n",
       "                ],\n",
       "                [\n",
       "                    1.9039955476301778,\n",
       "                    0.9450008187146685\n",
       "                ],\n",
       "                [\n",
       "                    1.967462065884517,\n",
       "                    0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    2.0309285841388562,\n",
       "                    0.8959937742913359\n",
       "                ],\n",
       "                [\n",
       "                    2.0943951023931957,\n",
       "                    0.8660254037844386\n",
       "                ],\n",
       "                [\n",
       "                    2.1578616206475347,\n",
       "                    0.8325698546347714\n",
       "                ],\n",
       "                [\n",
       "                    2.221328138901874,\n",
       "                    0.795761840530832\n",
       "                ],\n",
       "                [\n",
       "                    2.284794657156213,\n",
       "                    0.7557495743542583\n",
       "                ],\n",
       "                [\n",
       "                    2.3482611754105527,\n",
       "                    0.7126941713788627\n",
       "                ],\n",
       "                [\n",
       "                    2.4117276936648917,\n",
       "                    0.6667690005162916\n",
       "                ],\n",
       "                [\n",
       "                    2.475194211919231,\n",
       "                    0.6181589862206052\n",
       "                ],\n",
       "                [\n",
       "                    2.53866073017357,\n",
       "                    0.5670598638627709\n",
       "                ],\n",
       "                [\n",
       "                    2.6021272484279097,\n",
       "                    0.5136773915734063\n",
       "                ],\n",
       "                [\n",
       "                    2.6655937666822487,\n",
       "                    0.4582265217274105\n",
       "                ],\n",
       "                [\n",
       "                    2.729060284936588,\n",
       "                    0.4009305354066136\n",
       "                ],\n",
       "                [\n",
       "                    2.792526803190927,\n",
       "                    0.3420201433256689\n",
       "                ],\n",
       "                [\n",
       "                    2.8559933214452666,\n",
       "                    0.28173255684142967\n",
       "                ],\n",
       "                [\n",
       "                    2.9194598396996057,\n",
       "                    0.2203105327865408\n",
       "                ],\n",
       "                [\n",
       "                    2.982926357953945,\n",
       "                    0.1580013959733499\n",
       "                ],\n",
       "                [\n",
       "                    3.0463928762082846,\n",
       "                    0.09505604330418244\n",
       "                ],\n",
       "                [\n",
       "                    3.1098593944626236,\n",
       "                    0.031727933498067656\n",
       "                ],\n",
       "                [\n",
       "                    3.173325912716963,\n",
       "                    -0.03172793349806786\n",
       "                ],\n",
       "                [\n",
       "                    3.236792430971302,\n",
       "                    -0.09505604330418263\n",
       "                ],\n",
       "                [\n",
       "                    3.3002589492256416,\n",
       "                    -0.15800139597335008\n",
       "                ],\n",
       "                [\n",
       "                    3.3637254674799806,\n",
       "                    -0.22031053278654056\n",
       "                ],\n",
       "                [\n",
       "                    3.42719198573432,\n",
       "                    -0.28173255684142984\n",
       "                ],\n",
       "                [\n",
       "                    3.490658503988659,\n",
       "                    -0.34202014332566866\n",
       "                ],\n",
       "                [\n",
       "                    3.5541250222429985,\n",
       "                    -0.4009305354066138\n",
       "                ],\n",
       "                [\n",
       "                    3.6175915404973376,\n",
       "                    -0.4582265217274103\n",
       "                ],\n",
       "                [\n",
       "                    3.681058058751677,\n",
       "                    -0.5136773915734064\n",
       "                ],\n",
       "                [\n",
       "                    3.744524577006016,\n",
       "                    -0.5670598638627706\n",
       "                ],\n",
       "                [\n",
       "                    3.8079910952603555,\n",
       "                    -0.6181589862206053\n",
       "                ],\n",
       "                [\n",
       "                    3.8714576135146945,\n",
       "                    -0.6667690005162915\n",
       "                ],\n",
       "                [\n",
       "                    3.934924131769034,\n",
       "                    -0.7126941713788629\n",
       "                ],\n",
       "                [\n",
       "                    3.998390650023373,\n",
       "                    -0.7557495743542582\n",
       "                ],\n",
       "                [\n",
       "                    4.0618571682777125,\n",
       "                    -0.7957618405308321\n",
       "                ],\n",
       "                [\n",
       "                    4.1253236865320515,\n",
       "                    -0.8325698546347713\n",
       "                ],\n",
       "                [\n",
       "                    4.188790204786391,\n",
       "                    -0.8660254037844388\n",
       "                ],\n",
       "                [\n",
       "                    4.25225672304073,\n",
       "                    -0.895993774291336\n",
       "                ],\n",
       "                [\n",
       "                    4.3157232412950695,\n",
       "                    -0.9223542941045814\n",
       "                ],\n",
       "                [\n",
       "                    4.3791897595494085,\n",
       "                    -0.9450008187146683\n",
       "                ],\n",
       "                [\n",
       "                    4.442656277803748,\n",
       "                    -0.9638421585599422\n",
       "                ],\n",
       "                [\n",
       "                    4.506122796058087,\n",
       "                    -0.9788024462147787\n",
       "                ],\n",
       "                [\n",
       "                    4.569589314312426,\n",
       "                    -0.9898214418809327\n",
       "                ],\n",
       "                [\n",
       "                    4.6330558325667655,\n",
       "                    -0.9968547759519423\n",
       "                ],\n",
       "                [\n",
       "                    4.696522350821105,\n",
       "                    -0.9998741276738751\n",
       "                ],\n",
       "                [\n",
       "                    4.759988869075444,\n",
       "                    -0.998867339183008\n",
       "                ],\n",
       "                [\n",
       "                    4.823455387329783,\n",
       "                    -0.9938384644612541\n",
       "                ],\n",
       "                [\n",
       "                    4.886921905584122,\n",
       "                    -0.9848077530122081\n",
       "                ],\n",
       "                [\n",
       "                    4.950388423838462,\n",
       "                    -0.9718115683235417\n",
       "                ],\n",
       "                [\n",
       "                    5.013854942092801,\n",
       "                    -0.9549022414440739\n",
       "                ],\n",
       "                [\n",
       "                    5.07732146034714,\n",
       "                    -0.9341478602651068\n",
       "                ],\n",
       "                [\n",
       "                    5.14078797860148,\n",
       "                    -0.9096319953545182\n",
       "                ],\n",
       "                [\n",
       "                    5.204254496855819,\n",
       "                    -0.881453363447582\n",
       "                ],\n",
       "                [\n",
       "                    5.267721015110158,\n",
       "                    -0.8497254299495144\n",
       "                ],\n",
       "                [\n",
       "                    5.331187533364497,\n",
       "                    -0.8145759520503358\n",
       "                ],\n",
       "                [\n",
       "                    5.394654051618837,\n",
       "                    -0.7761464642917566\n",
       "                ],\n",
       "                [\n",
       "                    5.458120569873176,\n",
       "                    -0.7345917086575331\n",
       "                ],\n",
       "                [\n",
       "                    5.521587088127515,\n",
       "                    -0.690079011482112\n",
       "                ],\n",
       "                [\n",
       "                    5.585053606381854,\n",
       "                    -0.6427876096865396\n",
       "                ],\n",
       "                [\n",
       "                    5.648520124636194,\n",
       "                    -0.5929079290546402\n",
       "                ],\n",
       "                [\n",
       "                    5.711986642890533,\n",
       "                    -0.5406408174555974\n",
       "                ],\n",
       "                [\n",
       "                    5.775453161144872,\n",
       "                    -0.4861967361004688\n",
       "                ],\n",
       "                [\n",
       "                    5.838919679399211,\n",
       "                    -0.4297949120891719\n",
       "                ],\n",
       "                [\n",
       "                    5.902386197653551,\n",
       "                    -0.37166245566032724\n",
       "                ],\n",
       "                [\n",
       "                    5.96585271590789,\n",
       "                    -0.31203344569848707\n",
       "                ],\n",
       "                [\n",
       "                    6.029319234162229,\n",
       "                    -0.2511479871810794\n",
       "                ],\n",
       "                [\n",
       "                    6.092785752416569,\n",
       "                    -0.18925124436040974\n",
       "                ],\n",
       "                [\n",
       "                    6.156252270670908,\n",
       "                    -0.12659245357374904\n",
       "                ],\n",
       "                [\n",
       "                    6.219718788925247,\n",
       "                    -0.06342391965656452\n",
       "                ],\n",
       "                [\n",
       "                    6.283185307179586,\n",
       "                    -2.4492935982947064e-16\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        },\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 1,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": null\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 1,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"60%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        },\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"right\": \"60%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        },\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_27e3408130f1452b9ef377c8964e2b6d.setOption(option_27e3408130f1452b9ef377c8964e2b6d);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x1eab2d20e48>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Grid,Line,Scatter\n",
    "import pyecharts.options as opts\n",
    "import numpy as np\n",
    "\n",
    "x=np.linspace(0,2*np.pi,100)\n",
    "y=np.sin(x)\n",
    "\n",
    "lines=(\n",
    "   Line()\n",
    "    .add_xaxis(xaxis_data=x)\n",
    "    .add_yaxis(series_name='',y_axis=y,label_opts=opts.LabelOpts(is_show=False))\n",
    ")\n",
    "points=(\n",
    "   Scatter()\n",
    "   .add_xaxis(xaxis_data=x)\n",
    "   .add_yaxis(series_name='',y_axis=y,label_opts=opts.LabelOpts(is_show=False))\n",
    ")\n",
    "(\n",
    "  Grid()\n",
    "  .add(points,grid_opts=opts.GridOpts(pos_left='60%'))#grid_opts是直角坐标系网格配置项\n",
    "  .add(lines,grid_opts=opts.GridOpts(pos_right='60%'))\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n",
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"192b61b91859451db2e6b5051c289b41\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_192b61b91859451db2e6b5051c289b41 = echarts.init(\n",
       "                    document.getElementById('192b61b91859451db2e6b5051c289b41'), 'white', {renderer: 'canvas'});\n",
       "                var option_192b61b91859451db2e6b5051c289b41 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                110,\n",
       "                136,\n",
       "                108,\n",
       "                48,\n",
       "                111,\n",
       "                112,\n",
       "                103\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u54c8\\u58eb\\u5947\",\n",
       "                    110\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8428\\u6469\\u8036\",\n",
       "                    136\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cf0\\u8fea\",\n",
       "                    108\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u91d1\\u6bdb\",\n",
       "                    48\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u7267\\u7f8a\\u72ac\",\n",
       "                    111\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5409\\u5a03\\u5a03\",\n",
       "                    112\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u67ef\\u57fa\",\n",
       "                    103\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\",\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u54c8\\u58eb\\u5947\",\n",
       "                \"\\u8428\\u6469\\u8036\",\n",
       "                \"\\u6cf0\\u8fea\",\n",
       "                \"\\u91d1\\u6bdb\",\n",
       "                \"\\u7267\\u7f8a\\u72ac\",\n",
       "                \"\\u5409\\u5a03\\u5a03\",\n",
       "                \"\\u67ef\\u57fa\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_192b61b91859451db2e6b5051c289b41.setOption(option_192b61b91859451db2e6b5051c289b41);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x1ed2ccda248>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Bar,Line\n",
    "\n",
    "num=[110,136,108,48,111,112,103]\n",
    "lab=['哈士奇','萨摩耶','泰迪','金毛','牧羊犬','吉娃娃','柯基']\n",
    "bar=(\n",
    "  Bar(init_opts=opts.InitOpts(width='720px',height='320px'))\n",
    "  .add_xaxis(xaxis_data=lab)\n",
    "  .add_yaxis(series_name='',y_axis=num)\n",
    ")\n",
    "lines=(\n",
    "  Line()\n",
    "    .add_xaxis(xaxis_data=lab)\n",
    "    .add_yaxis(series_name='',y_axis=num,label_opts=opts.LabelOpts(is_show=False))\n",
    ")\n",
    "bar.overlap(lines).render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Pyecharts地理图表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"8997a606773747c58607ff20da0fd191\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_8997a606773747c58607ff20da0fd191 = echarts.init(\n",
       "                    document.getElementById('8997a606773747c58607ff20da0fd191'), 'white', {renderer: 'canvas'});\n",
       "                var option_8997a606773747c58607ff20da0fd191 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": [\n",
       "                        113.26653,\n",
       "                        23.132191,\n",
       "                        80\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        116.407526,\n",
       "                        39.90403,\n",
       "                        108\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        121.473701,\n",
       "                        31.230416,\n",
       "                        101\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": [\n",
       "                        115.909228,\n",
       "                        28.675696,\n",
       "                        76\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": [\n",
       "                        112.98381,\n",
       "                        28.112444,\n",
       "                        101\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": [\n",
       "                        120.152791,\n",
       "                        30.267446,\n",
       "                        22\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": [\n",
       "                        118.763232,\n",
       "                        32.061707,\n",
       "                        72\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e2d\\u56fd\\u5730\\u56fe(\\u7279\\u6548\\u6563\\u70b9\\u56fe)\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"china\",\n",
       "        \"roam\": true,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_8997a606773747c58607ff20da0fd191.setOption(option_8997a606773747c58607ff20da0fd191);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2893c5ebbc8>"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Geo\n",
    "import pyecharts.options as opts\n",
    "from pyecharts.globals import ChartType\n",
    "\n",
    "from commons import Faker#当前工作路径下的脚本中的命名\n",
    "(\n",
    " Geo(init_opts=opts.InitOpts(width='720px',height='320px'))\n",
    " .add_schema(maptype='china')\n",
    " .add(series_name='',data_pair=[(i,j)for i,j in zip(Faker.provinces,Faker.values())],\n",
    "    type_=ChartType.EFFECT_SCATTER,label_opts=opts.LabelOpts(is_show=False))#type_是设置特效8\n",
    " .set_global_opts(\n",
    "   title_opts=opts.TitleOpts(title='中国地图(特效散点图)'),\n",
    "   visualmap_opts=opts.VisualMapOpts()#is_piecewise=True如果括号中有is_piecewise则分段，没有就是0-100整个\n",
    " )\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"4d6d82beaebc460695abdbe6c703ea7f\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_4d6d82beaebc460695abdbe6c703ea7f = echarts.init(\n",
       "                    document.getElementById('4d6d82beaebc460695abdbe6c703ea7f'), 'white', {renderer: 'canvas'});\n",
       "                var option_4d6d82beaebc460695abdbe6c703ea7f = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"white\",\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        113.23,\n",
       "                        23.16,\n",
       "                        105\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6210\\u90fd\",\n",
       "                    \"value\": [\n",
       "                        104.06,\n",
       "                        30.67,\n",
       "                        70\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        116.407526,\n",
       "                        39.90403,\n",
       "                        99\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u5b89\",\n",
       "                    \"value\": [\n",
       "                        108.95,\n",
       "                        34.27,\n",
       "                        80\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"lines\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"zlevel\": 3,\n",
       "            \"progressive\": 400,\n",
       "            \"progressiveThreshold\": 3000,\n",
       "            \"effect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4,\n",
       "                \"color\": \"blue\",\n",
       "                \"symbol\": \"arrow\",\n",
       "                \"symbolSize\": 8\n",
       "            },\n",
       "            \"symbol\": [\n",
       "                \"none\",\n",
       "                \"arrow\"\n",
       "            ],\n",
       "            \"polyline\": false,\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 2000,\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde->\\u6210\\u90fd\",\n",
       "                    \"coords\": [\n",
       "                        [\n",
       "                            113.23,\n",
       "                            23.16\n",
       "                        ],\n",
       "                        [\n",
       "                            104.06,\n",
       "                            30.67\n",
       "                        ]\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde->\\u5317\\u4eac\",\n",
       "                    \"coords\": [\n",
       "                        [\n",
       "                            113.23,\n",
       "                            23.16\n",
       "                        ],\n",
       "                        [\n",
       "                            116.407526,\n",
       "                            39.90403\n",
       "                        ]\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde->\\u897f\\u5b89\",\n",
       "                    \"coords\": [\n",
       "                        [\n",
       "                            113.23,\n",
       "                            23.16\n",
       "                        ],\n",
       "                        [\n",
       "                            108.95,\n",
       "                            34.27\n",
       "                        ]\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\",\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u52a8\\u6001\\u5730\\u7406\\u8fc1\\u5f99\\u5730\\u56fe(\\u7279\\u6548)\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"geo\": {\n",
       "        \"map\": \"china\",\n",
       "        \"roam\": true,\n",
       "        \"itemStyle\": {\n",
       "            \"color\": \"#323c48\",\n",
       "            \"borderColor\": \"#11\"\n",
       "        },\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_4d6d82beaebc460695abdbe6c703ea7f.setOption(option_4d6d82beaebc460695abdbe6c703ea7f);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x1fa8a545a88>"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Geo\n",
    "import pyecharts.options as opts\n",
    "from pyecharts.globals import ChartType,SymbolType\n",
    "\n",
    "city_num=[('广州',105),('成都',70),('北京',99),('西安',80)]\n",
    "start_end=[('广州','成都'),('广州','北京'),('广州','西安')]\n",
    "(\n",
    "Geo(init_opts=opts.InitOpts(width='720px',height='320px'))\n",
    " .add_schema(maptype='china',\n",
    "             itemstyle_opts=opts.ItemStyleOpts(color='#323c48',border_color='#11'))\n",
    "  .add(series_name='',data_pair=city_num,color='white', type_=ChartType.EFFECT_SCATTER,label_opts=opts.LabelOpts(is_show=False))\n",
    "  .add('',data_pair=start_end,type_=ChartType.LINES,#类型改为箭头线\n",
    "      effect_opts=opts.EffectOpts(symbol=SymbolType.ARROW,#设置动态效果，EffectOpt改为箭头形式\n",
    "                                  color='blue',symbol_size=8),label_opts=opts.LabelOpts(is_show=False))\n",
    "     .set_global_opts( title_opts=opts.TitleOpts(title='动态地理迁徙地图(特效)'))\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '广东':'https://assets.pyecharts.org/assets/maps/guangdong'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"bc07ccd4107c4f6cb1ba7fffcd12e4c3\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '广东'], function(echarts) {\n",
       "                var chart_bc07ccd4107c4f6cb1ba7fffcd12e4c3 = echarts.init(\n",
       "                    document.getElementById('bc07ccd4107c4f6cb1ba7fffcd12e4c3'), 'white', {renderer: 'canvas'});\n",
       "                var option_bc07ccd4107c4f6cb1ba7fffcd12e4c3 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"heatmap\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6c55\\u5934\\u5e02\",\n",
       "                    \"value\": [\n",
       "                        116.68,\n",
       "                        23.35,\n",
       "                        145\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c55\\u5c3e\\u5e02\",\n",
       "                    \"value\": [\n",
       "                        115.37,\n",
       "                        22.78,\n",
       "                        119\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u63ed\\u9633\\u5e02\",\n",
       "                    \"value\": [\n",
       "                        116.37,\n",
       "                        23.55,\n",
       "                        114\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9633\\u6c5f\\u5e02\",\n",
       "                    \"value\": [\n",
       "                        111.98,\n",
       "                        21.87,\n",
       "                        38\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8087\\u5e86\\u5e02\",\n",
       "                    \"value\": [\n",
       "                        112.47,\n",
       "                        23.05,\n",
       "                        134\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\\u5e02\",\n",
       "                    \"value\": [\n",
       "                        113.27,\n",
       "                        23.13,\n",
       "                        93\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u60e0\\u5dde\\u5e02\",\n",
       "                    \"value\": [\n",
       "                        114.42,\n",
       "                        23.12,\n",
       "                        24\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"pointSize\": 20,\n",
       "            \"blurSize\": 20\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u70ed\\u529b\\u5730\\u56fe(\\u7279\\u6548\\u6563\\u70b9\\u56fe)\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"\\u5e7f\\u4e1c\",\n",
       "        \"roam\": true,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_bc07ccd4107c4f6cb1ba7fffcd12e4c3.setOption(option_bc07ccd4107c4f6cb1ba7fffcd12e4c3);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2893d013988>"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Geo\n",
    "import pyecharts.options as opts\n",
    "from pyecharts.globals import ChartType\n",
    "from commons import Faker#当前工作路径下的脚本中的命名\n",
    "(\n",
    "  Geo(init_opts=opts.InitOpts(width='720px',height='320px'))\n",
    "    .add_schema(maptype='广东')\n",
    "     .add(series_name='',data_pair=[(i,j)for i,j in zip(Faker.guangdong_city,Faker.values())],\n",
    "    type_=ChartType.HEATMAP)\n",
    "     .set_global_opts( title_opts=opts.TitleOpts(title='热力地图(特效散点图)'),\n",
    "   visualmap_opts=opts.VisualMapOpts()#is_piecewise=True如果括号中有is_piecewise则分段，没有就是0-100整个\n",
    " )\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '广东':'https://assets.pyecharts.org/assets/maps/guangdong'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"b36ff50c30a44377bb0a950b42647288\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '广东'], function(echarts) {\n",
       "                var chart_b36ff50c30a44377bb0a950b42647288 = echarts.init(\n",
       "                    document.getElementById('b36ff50c30a44377bb0a950b42647288'), 'white', {renderer: 'canvas'});\n",
       "                var option_b36ff50c30a44377bb0a950b42647288 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"\\u5e7f\\u4e1c\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6c55\\u5934\\u5e02\",\n",
       "                    \"value\": 48\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c55\\u5c3e\\u5e02\",\n",
       "                    \"value\": 129\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u63ed\\u9633\\u5e02\",\n",
       "                    \"value\": 78\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9633\\u6c5f\\u5e02\",\n",
       "                    \"value\": 124\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8087\\u5e86\\u5e02\",\n",
       "                    \"value\": 87\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\\u5e02\",\n",
       "                    \"value\": 130\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u60e0\\u5dde\\u5e02\",\n",
       "                    \"value\": 91\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"zoom\": 1,\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_b36ff50c30a44377bb0a950b42647288.setOption(option_b36ff50c30a44377bb0a950b42647288);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2893c8d4648>"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Map\n",
    "from commons import Faker#当前工作路径下的脚本中的命名\n",
    "(\n",
    " Map(init_opts=opts.InitOpts(width='720px',height='320px'))\n",
    "    .add('',[(i,j)for i,j in zip(Faker.guangdong_city,Faker.values())],'广东')\n",
    "     .set_global_opts(visualmap_opts=opts.VisualMapOpts())\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Getting uuid of QR code.\n",
      "Downloading QR code.\n",
      "Please scan the QR code to log in.\n",
      "Please press confirm on your phone.\n",
      "Loading the contact, this may take a little while.\n",
      "Login successfully as spring\n"
     ]
    }
   ],
   "source": [
    "from wxpy import Bot\n",
    "bot=Bot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<Friend: spring>,\n",
       " <Friend: 王小弟>,\n",
       " <Friend: N青青>,\n",
       " <Friend: shopping忙于学习的靠谱港代>,\n",
       " <Friend: 志女>,\n",
       " <Friend: 金秀>,\n",
       " <Friend: shopping卖耳环的小跳蚤 <span class=\"emoji emoji1f33e\"></span>>,\n",
       " <Friend: 王海崑>,\n",
       " <Friend: 老王同志<span class=\"emoji emoji2764\"></span> >,\n",
       " <Friend: Robert &amp; Eva花莲住宿>,\n",
       " <Friend: 墾丁船帆柒壹零>,\n",
       " <Friend: N研工部冯慧英 >,\n",
       " <Friend: 老林>,\n",
       " <Friend: N招办老师张雯鑫>,\n",
       " <Friend: shopping一只荡秋千的猫>,\n",
       " <Friend: 肖永军>,\n",
       " <Friend: 肖子康>,\n",
       " <Friend: 张震>,\n",
       " <Friend: 拴马桩擀面皮17791585958>,\n",
       " <Friend: 冯金秀>,\n",
       " <Friend: 顾大超>,\n",
       " <Friend: N3贺壮壮>,\n",
       " <Friend: 腾讯教育HR胡曼璐>,\n",
       " <Friend: 李乔>,\n",
       " <Friend: 王俊飞>,\n",
       " <Friend: 台北赖妈妈>,\n",
       " <Friend: 戴老师>,\n",
       " <Friend: 韵达快递>,\n",
       " <Friend: 上交大夏令营巨俪<span class=\"emoji emoji1f1e81f1f3\"></span>>,\n",
       " <Friend: N3严潇龙>,\n",
       " <Friend: 郑口薛智>,\n",
       " <Friend: N超哥>,\n",
       " <Friend: N3亚克甫江>,\n",
       " <Friend: 郑口王有哲>,\n",
       " <Friend: 衡中董航>,\n",
       " <Friend: 郑口杨文元>,\n",
       " <Friend: N3赵姗>,\n",
       " <Friend: N3董琪琪>,\n",
       " <Friend: N3桂健华>,\n",
       " <Friend: 郑口刘国晓>,\n",
       " <Friend: N3刘海林>,\n",
       " <Friend: N社联冯靖宇>,\n",
       " <Friend: N3许志德>,\n",
       " <Friend: 郑口高信勇>,\n",
       " <Friend: N3潘宁宁>,\n",
       " <Friend: N3秦星月>,\n",
       " <Friend: N社联彭驰葳>,\n",
       " <Friend: N3李霖>,\n",
       " <Friend: N3窦姗姗>,\n",
       " <Friend: 衡中于海东>,\n",
       " <Friend: N丁闯>,\n",
       " <Friend: 衡中刘泽配>,\n",
       " <Friend: N2程响>,\n",
       " <Friend: N3白敬贤>,\n",
       " <Friend: N3谢宇英>,\n",
       " <Friend: 衡中薛颂生>,\n",
       " <Friend: N3伊布拉依>,\n",
       " <Friend: 衡中刘佳皓>,\n",
       " <Friend: 郑口于霞>,\n",
       " <Friend: 衡中徐鹏>,\n",
       " <Friend: N3吉普>,\n",
       " <Friend: 衡中张帆>,\n",
       " <Friend: N3杨文星>,\n",
       " <Friend: N社联袁锦>,\n",
       " <Friend: N哈梦可>,\n",
       " <Friend: N3田豪>,\n",
       " <Friend: N3爽姐>,\n",
       " <Friend: N3梅潇>,\n",
       " <Friend: N3邓恒>,\n",
       " <Friend: N社联汪宏宇>,\n",
       " <Friend: N3李晓彬>,\n",
       " <Friend: N3姬托>,\n",
       " <Friend: N黄哲>,\n",
       " <Friend: 李静>,\n",
       " <Friend: 固生堂医生>,\n",
       " <Friend: N3路达>,\n",
       " <Friend: N3刘颖师姐>,\n",
       " <Friend: N3孟强师兄>,\n",
       " <Friend: N刘赛恒>,\n",
       " <Friend: N3杨倩妮>,\n",
       " <Friend: N3王俊雄>,\n",
       " <Friend: N3蒲传新书记>,\n",
       " <Friend: N3王方超>,\n",
       " <Friend: N3王伟伟，冷冰的师兄>,\n",
       " <Friend: N3刘国鹏>,\n",
       " <Friend: N3杨玻>,\n",
       " <Friend: 宋朝晖处长>,\n",
       " <Friend: 张主任>,\n",
       " <Friend: 庄亦颖>,\n",
       " <Friend: N3柒志光>,\n",
       " <Friend: 冯老师>,\n",
       " <Friend: 衡中胡志霞老师>,\n",
       " <Friend: 衡中刘威>,\n",
       " <Friend: 衡中王博>,\n",
       " <Friend: 舅妈>,\n",
       " <Friend: shopping 小贤姐姐代购>,\n",
       " <Friend: 李浩铭>,\n",
       " <Friend: N3黄华>,\n",
       " <Friend: 郑口任晓阳>,\n",
       " <Friend: 衡中李达>,\n",
       " <Friend: 所党办闫伟丽>,\n",
       " <Friend: N思芹>,\n",
       " <Friend: 差不多商店>,\n",
       " <Friend: N社联秦星月姐>,\n",
       " <Friend: N3曹旭>,\n",
       " <Friend: 白冰>,\n",
       " <Friend: 孔强>,\n",
       " <Friend: 楠希小馆-老伴儿服务部>,\n",
       " <Friend: N1张鑫焱>,\n",
       " <Friend: N吉吉>,\n",
       " <Friend: A.泊寓西直门店 13141107838>,\n",
       " <Friend: A泊寓安贞店18515269436>,\n",
       " <Friend: 衡中马文婷>,\n",
       " <Friend: 郑口刁志彪>,\n",
       " <Friend: 赵记绿豆馅饼（饼老大）>,\n",
       " <Friend: 715戴老师>,\n",
       " <Friend: N社联徐艳丽>,\n",
       " <Friend: 鄢社锋主任>,\n",
       " <Friend: 工会魏老师>,\n",
       " <Friend: 时时种草机>,\n",
       " <Friend: N郑口李文凯>,\n",
       " <Friend: N3李杰美慧>,\n",
       " <Friend: N3梁燕>,\n",
       " <Friend: N3郭拓师兄>,\n",
       " <Friend: 瑞徵妇科-刘金来>,\n",
       " <Friend: 衡中楚亚磊>,\n",
       " <Friend: N3张广洁>,\n",
       " <Friend: 南航北京行李服务部>,\n",
       " <Friend: 张意红老师>,\n",
       " <Friend: N3王超19师弟>,\n",
       " <Friend: 吴沫>,\n",
       " <Friend: 李娟老师>,\n",
       " <Friend: 衡中王亚杰>,\n",
       " <Friend: 郑口老贝>,\n",
       " <Friend: 衡中刘义彬>,\n",
       " <Friend: N3韩子舒>,\n",
       " <Friend: N3吴帆>,\n",
       " <Friend: 奚钧壹>,\n",
       " <Friend: N3董志昊>,\n",
       " <Friend: N3黎敬源>,\n",
       " <Friend: N3张珺璐>,\n",
       " <Friend: 翟国静老师>,\n",
       " <Friend: 郑口朱春焕>,\n",
       " <Friend: N3章瑞>,\n",
       " <Friend: N3师亚桢>,\n",
       " <Friend: 杨少武参谋>,\n",
       " <Friend: N3虞梦苓>,\n",
       " <Friend: 韩老师>,\n",
       " <Friend: N3任珍>,\n",
       " <Friend: 衡中张明欢>,\n",
       " <Friend: N3张心怡>,\n",
       " <Friend: N3张萌飞>,\n",
       " <Friend: N1艾霄鹏>,\n",
       " <Friend: N社联姜倩>,\n",
       " <Friend: 贺凯飞_中国石油大学>,\n",
       " <Friend: 孙飞虎>,\n",
       " <Friend: shopping步履不停（我的专属狗仔）>,\n",
       " <Friend: 郑口田利亚>,\n",
       " <Friend: shoppingA.<span class=\"emoji emoji1f3a5\"></span>党佳博 <span class=\"emoji emoji1f1e81f1f3\"></span>>,\n",
       " <Friend: N3孙佳伟>,\n",
       " <Friend: N3李琦>,\n",
       " <Friend: 徐及声学所>,\n",
       " <Friend: 33所宋洋>,\n",
       " <Friend: N_夏麾军>,\n",
       " <Friend: 衡中白子玉>,\n",
       " <Friend: N3王通>,\n",
       " <Friend: N3亚豪>,\n",
       " <Friend: N3崔栋>,\n",
       " <Friend: N3荣姐>,\n",
       " <Friend: AA卤小安现调卤味AA>,\n",
       " <Friend: N3何清>,\n",
       " <Friend: 高中数学-代宇>,\n",
       " <Friend: N3张娇>,\n",
       " <Friend: N聂宸扬>,\n",
       " <Friend: N马朝也衡中学弟>,\n",
       " <Friend: N3刘智豪>,\n",
       " <Friend: 张海涛>,\n",
       " <Friend: 衡中李永豪>,\n",
       " <Friend: N3汤丹妮>,\n",
       " <Friend: N3赵旭东>,\n",
       " <Friend: N3王龙>,\n",
       " <Friend: N3贾汝冰>,\n",
       " <Friend: 衡中赵彧洋>,\n",
       " <Friend: N3鲁欢>,\n",
       " <Friend: N3郭笑莹学姐>,\n",
       " <Friend: 王俊超>,\n",
       " <Friend: 刘松>,\n",
       " <Friend: N3刘培亮>,\n",
       " <Friend: N3硕英妹>,\n",
       " <Friend: N3喜燕姐>,\n",
       " <Friend: N3杨建平>,\n",
       " <Friend: N杜智慧>,\n",
       " <Friend: N3崔哲荣>,\n",
       " <Friend: N老师李淼>,\n",
       " <Friend: N2陈杰>,\n",
       " <Friend: N3文楚>,\n",
       " <Friend: 郑口吴然>,\n",
       " <Friend: 郑口张强>,\n",
       " <Friend: 衡中罗攀>,\n",
       " <Friend: N社联冯邈>,\n",
       " <Friend: N3陈涛师兄>,\n",
       " <Friend: 衡中李慎>,\n",
       " <Friend: N3孙斌>,\n",
       " <Friend: 郑口彤彤姐姐>,\n",
       " <Friend: 三院33所>,\n",
       " <Friend: N3尤明涛>,\n",
       " <Friend: 衡中王冬青>,\n",
       " <Friend: N3杜伟强>,\n",
       " <Friend: N3王子道>,\n",
       " <Friend: 郑口栾鹏>,\n",
       " <Friend: N3冯凯>,\n",
       " <Friend: N3张润智>,\n",
       " <Friend: 李朋程>,\n",
       " <Friend: 吃货研究员2号>,\n",
       " <Friend: 姜玮>,\n",
       " <Friend: 衡中刘根茂>,\n",
       " <Friend: N3毛琳琳>,\n",
       " <Friend: N恒哥>,\n",
       " <Friend: N3董鹏飞师兄>,\n",
       " <Friend: N3李靖驰>,\n",
       " <Friend: N天鸿哥>,\n",
       " <Friend: Cho>,\n",
       " <Friend: N社联朱虹>,\n",
       " <Friend: 綦宾>,\n",
       " <Friend: N3余金花>,\n",
       " <Friend: N3樊宽师兄>,\n",
       " <Friend: 徐达>,\n",
       " <Friend: 婶儿>,\n",
       " <Friend: N3朱国磊老师>,\n",
       " <Friend: 敬曾>,\n",
       " <Friend: 华大智宝张老师>,\n",
       " <Friend: N3高鹏>,\n",
       " <Friend: N3张莹络师姐>,\n",
       " <Friend: 上交大学长魏旺>,\n",
       " <Friend: 王泽海>,\n",
       " <Friend: 衡中樊芳>,\n",
       " <Friend: N3王谋>,\n",
       " <Friend: N社联郭元鹏>,\n",
       " <Friend: 衡中刑鹏超>,\n",
       " <Friend: N3胡喜涛>,\n",
       " <Friend: 科旅>,\n",
       " <Friend: 古早味（体育馆南路店）>,\n",
       " <Friend: N老师邱宏安老师>,\n",
       " <Friend: 衡中卢宇航>,\n",
       " <Friend: 郑口张真>,\n",
       " <Friend: N3李芳>,\n",
       " <Friend: N3赵杨师姐>,\n",
       " <Friend: N3张加奇>,\n",
       " <Friend: 郑口陈静>,\n",
       " <Friend: N3张淑莹>,\n",
       " <Friend: 美丽中国招募经理王帅>,\n",
       " <Friend: N3朱永正>,\n",
       " <Friend: 郑口倪菲菲>,\n",
       " <Friend: 大领导<span class=\"emoji emoji2764\"></span> >,\n",
       " <Friend: N3易娱月>,\n",
       " <Friend: N3张博轩>,\n",
       " <Friend: 衡中李乃星>,\n",
       " <Friend: N3华栋>,\n",
       " <Friend: 郑口刘文燕>,\n",
       " <Friend: N3孟千竣>,\n",
       " <Friend: 这>,\n",
       " <Friend: N重元哥>,\n",
       " <Friend: N夏子姐>,\n",
       " <Friend: N社联白书颖>,\n",
       " <Friend: N3罗婕>,\n",
       " <Friend: N3张天奇>,\n",
       " <Friend: N3高洁宇>,\n",
       " <Friend: N3吴旭貌>,\n",
       " <Friend: N王佳佳>,\n",
       " <Friend: N3魏然风>,\n",
       " <Friend: N3莫慧黠>,\n",
       " <Friend: N3张仲尧>,\n",
       " <Friend: 柳玉姐姐>,\n",
       " <Friend: 詹飞>,\n",
       " <Friend: 马慧>,\n",
       " <Friend: N陈涛师兄女朋友贾媛媛>,\n",
       " <Friend: N社联郝亚会>,\n",
       " <Friend: N唐伟康>,\n",
       " <Friend: N3桑殿一>,\n",
       " <Friend: N3冰姐>,\n",
       " <Friend: 郑口刘腾>,\n",
       " <Friend: 上交大夏令营史书靖>,\n",
       " <Friend: A  TlME时光发型机构--岳嶽>,\n",
       " <Friend: N3程雪师姐>,\n",
       " <Friend: 吴永清老师>,\n",
       " <Friend: 郑口贾媛媛>,\n",
       " <Friend: N3游英杰>,\n",
       " <Friend: N3杨斌斌>,\n",
       " <Friend: 衡中刘博文>,\n",
       " <Friend: N3付家奇>,\n",
       " <Friend: 薛爽三院三部>,\n",
       " <Friend: 柯雨璇>,\n",
       " <Friend: N社联格格>,\n",
       " <Friend: N2刘东东>,\n",
       " <Friend: 李英博>,\n",
       " <Friend: 衡中马佩孜>,\n",
       " <Friend: 乔立伟-中船X07>,\n",
       " <Friend: 中山大学张金钡>,\n",
       " <Friend: 嫂子>,\n",
       " <Friend: 衡中王栢嵊>,\n",
       " <Friend: N3王悦关>,\n",
       " <Friend: N3戴萌>,\n",
       " <Friend: 衡中_白江鹏>,\n",
       " <Friend: 敬英>,\n",
       " <Friend: 戴萌>,\n",
       " <Friend: 哈工程-郭企嘉>,\n",
       " <Friend: 中大戴志强>,\n",
       " <Friend: 王彬>,\n",
       " <Friend: 董程>,\n",
       " <Friend: N3曾梓若>,\n",
       " <Friend: 三院三部水下管理办公室 马超>,\n",
       " <Friend: N3樊成>,\n",
       " <Friend: 衡中王嘉会>,\n",
       " <Friend: N3薛昱>,\n",
       " <Friend: 郑口天娇姐>,\n",
       " <Friend: 郑口刘文燕>,\n",
       " <Friend: 袁💪 强>,\n",
       " <Friend: 拴马桩擀面皮>,\n",
       " <Friend: 上交大夏令营袁婷婷>,\n",
       " <Friend: 衡中魏雯博>,\n",
       " <Friend: N3段优优>,\n",
       " <Friend: 衡中许慧捷>,\n",
       " <Friend: 郑口秦徳浩>,\n",
       " <Friend: N3部长李玉旭>,\n",
       " <Friend: 小紫>,\n",
       " <Friend: 衡中刘晓童>,\n",
       " <Friend: 郑口庚莉伟>,\n",
       " <Friend: 李鹏飞>,\n",
       " <Friend: N3张宇坤>,\n",
       " <Friend: N3庞思达>,\n",
       " <Friend: 张同伟>,\n",
       " <Friend: 魏漫漫老师>,\n",
       " <Friend: 西电王远飞>,\n",
       " <Friend: 李璐莎  <span class=\"emoji emoji2747\"></span>>,\n",
       " <Friend: N社联潘晶晶>,\n",
       " <Friend: 小崔>,\n",
       " <Friend: N3赵璇>,\n",
       " <Friend: N宋颜>,\n",
       " <Friend: 郑口林晓婷>,\n",
       " <Friend: shopping在澳洲>,\n",
       " <Friend: N3柳溪>,\n",
       " <Friend: N3杨洋>,\n",
       " <Friend: New Face>,\n",
       " <Friend: 薇薇<span class=\"emoji emoji1f388\"></span>台灣自由行>,\n",
       " <Friend: 纪晓斐>,\n",
       " <Friend: N4刘格君>,\n",
       " <Friend: N3吴茹>,\n",
       " <Friend: 衡中李丹阳>,\n",
       " <Friend: 衡中侯仁杰>,\n",
       " <Friend: NSheri 韩小李<span class=\"emoji emoji1f3a9\"></span>>,\n",
       " <Friend: 小叔>,\n",
       " <Friend: 衡中马琛>,\n",
       " <Friend: 衡中苏晓静>,\n",
       " <Friend: N3郝宇航>,\n",
       " <Friend: 牛牛>,\n",
       " <Friend: N3吴琼>,\n",
       " <Friend: 郑口王英泽>,\n",
       " <Friend: 上交大夏令营屈凯旸>,\n",
       " <Friend: N3王克洋>,\n",
       " <Friend: N3韩鹏>,\n",
       " <Friend: A周大福～小丽>,\n",
       " <Friend: N3吴越>,\n",
       " <Friend: N2刘雅倩>,\n",
       " <Friend: 甘老师五十四所>,\n",
       " <Friend: 荣叔>,\n",
       " <Friend: 郑口刘兆星>,\n",
       " <Friend: 中电三铁老师>,\n",
       " <Friend: N3谢步亮>,\n",
       " <Friend: N3王磊>,\n",
       " <Friend: N王溥轩>,\n",
       " <Friend: 衡中张阳>,\n",
       " <Friend: N排长>,\n",
       " <Friend: 赵️晴晴>,\n",
       " <Friend: N3任熙昊>,\n",
       " <Friend: N3龙浩>,\n",
       " <Friend: N3杨洪润>,\n",
       " <Friend: 黄其若>,\n",
       " <Friend: 钱琛>,\n",
       " <Friend: 衡中宋沐沐>,\n",
       " <Friend: N3孙少华>,\n",
       " <Friend: N3欧俊麟>,\n",
       " <Friend: N317级-朱建超18729010919>,\n",
       " <Friend: shopping花店Jomo Roses>,\n",
       " <Friend: 衡中武雅静>,\n",
       " <Friend: 郑口韩凤雪>,\n",
       " <Friend: SÜmmer>,\n",
       " <Friend: N3卢鑫>,\n",
       " <Friend: N招办老师_陈雪琦>,\n",
       " <Friend: 郑口毛俊超>,\n",
       " <Friend: N古琴高晨雨>,\n",
       " <Friend: N3张北辰>,\n",
       " <Friend: 衡中邓延璐>,\n",
       " <Friend: N3舒展>,\n",
       " <Friend: 腾讯教育赵一一>,\n",
       " <Friend:  孙阳，18510788266>,\n",
       " <Friend: 衡中刘洋洋>,\n",
       " <Friend: 郑口薛文环>,\n",
       " <Friend: 张博>,\n",
       " <Friend: N3老师朱宁>,\n",
       " <Friend: N贵贵>,\n",
       " <Friend: N3胡欣>,\n",
       " <Friend: 汉光百货乐町>,\n",
       " <Friend: 衡中商策>,\n",
       " <Friend: 如愿>,\n",
       " <Friend: 郑口杨洁>,\n",
       " <Friend: N3辛天祺>,\n",
       " <Friend: N社联孙琪>,\n",
       " <Friend: 汉光百货  Tiger>,\n",
       " <Friend: N3刘铱豪>,\n",
       " <Friend: 张馨月>,\n",
       " <Friend: 涂涂plus>,\n",
       " <Friend: N3伊淑珍>,\n",
       " <Friend: 郑口张亚菲>,\n",
       " <Friend: 李瑨瑶-机关>,\n",
       " <Friend: N3桂旭东>,\n",
       " <Friend: N3宋家晨>,\n",
       " <Friend: 耿喆元>,\n",
       " <Friend: 腾讯教育李宁>,\n",
       " <Friend: 郑口贾永发>,\n",
       " <Friend: 海虹酒店销售部小陈>,\n",
       " <Friend: N王莉>,\n",
       " <Friend: 衡中Y.H. <span class=\"emoji emoji1f433\"></span>>,\n",
       " <Friend: N社联彩云>,\n",
       " <Friend: N社联章琎>,\n",
       " <Friend: 郑口杨雪>,\n",
       " <Friend: N3张倩>,\n",
       " <Friend: N3毛琼>,\n",
       " <Friend: N社联张阳>,\n",
       " <Friend: 上交大夏令营唐丽媛>,\n",
       " <Friend: 衡中姚林林>,\n",
       " <Friend: N3宋尚焕>,\n",
       " <Friend: 材料学院―巩晓芳>,\n",
       " <Friend: N3安徽学长>,\n",
       " <Friend: 于斐>,\n",
       " <Friend: N3吴东>,\n",
       " <Friend: N3刘媛>,\n",
       " <Friend: N睿睿哥>,\n",
       " <Friend: 韵达快递>,\n",
       " <Friend: N3刘剑鱼～17级硕士>,\n",
       " <Friend: Yang>,\n",
       " <Friend: shopping<span class=\"emoji emoji1f451\"></span>kinlaaa（ik家<span class=\"emoji emoji1f1f01f1f7\"></span>）>,\n",
       " <Friend: 周鑫>,\n",
       " <Friend: N强哥>,\n",
       " <Friend: 陵水新村张亮麻辣烫>,\n",
       " <Friend: N1颜胖墩儿男票>,\n",
       " <Friend: 衡中周羽西>,\n",
       " <Friend: N3王童豪>,\n",
       " <Friend: 衡中吕磊鑫>,\n",
       " <Friend: N3刘雪>,\n",
       " <Friend: N盛毓强>,\n",
       " <Friend: N3宋强林>,\n",
       " <Friend: N32019级师妹>,\n",
       " <Friend: 衡中高佳佳>,\n",
       " <Friend: 江鹏>,\n",
       " <Friend: N3梁爱青>,\n",
       " <Friend: N3张楊>,\n",
       " <Friend: N社联范家琦>,\n",
       " <Friend: 衡中孙鹤>,\n",
       " <Friend: 韩非>,\n",
       " <Friend: 上交大夏令营田辰玲 武汉理工>,\n",
       " <Friend: 绿城蓝湾度假酒店前台>,\n",
       " <Friend: N3牛彦鹏师兄>,\n",
       " <Friend: N3马倩茹>,\n",
       " <Friend: 申奇>,\n",
       " <Friend: N3白伶俐>,\n",
       " <Friend: 心平气和>,\n",
       " <Friend: 穆斯林饭店>,\n",
       " <Friend: 衡中关浩亮>,\n",
       " <Friend: N3李烨紫>,\n",
       " <Friend: N3周治宇>,\n",
       " <Friend: 郑口王博>,\n",
       " <Friend: N3涛哥>,\n",
       " <Friend: N3陈林>,\n",
       " <Friend: N老胡>,\n",
       " <Friend: N3孙雪莹>,\n",
       " <Friend: N3张泽旭>,\n",
       " <Friend: 小学数学-于欣-济南>,\n",
       " <Friend: N不熟Definitely salao, Almost lucky.>,\n",
       " <Friend: 徐立军老师>,\n",
       " <Friend: 衡中王家琳>,\n",
       " <Friend: 郑口赵培>,\n",
       " <Friend: N3刘物己>,\n",
       " <Friend: N1张海岗>,\n",
       " <Friend: N3王嘉颖>,\n",
       " <Friend: N小帅帅>,\n",
       " <Friend: N3赵耀华>,\n",
       " <Friend: N社联郭鹏飞>,\n",
       " <Friend: N社联姚心亮>,\n",
       " <Friend: 王迪>,\n",
       " <Friend: 衡中李真>,\n",
       " <Friend: N3杨宇豪>,\n",
       " <Friend: N社联李伟恒>,\n",
       " <Friend: N3李东波>,\n",
       " <Friend: N3王梦凡>,\n",
       " <Friend: N3刘晴>,\n",
       " <Friend: N3张劲喆>,\n",
       " <Friend: 刘尔>,\n",
       " <Friend: N3李之达>,\n",
       " <Friend: N3王芳>,\n",
       " <Friend: ॱ>,\n",
       " <Friend: 南方航空登机服务室>,\n",
       " <Friend: 小豬哥>,\n",
       " <Friend: N3万蕊>,\n",
       " <Friend: LouisMiiing>,\n",
       " <Friend: 朱祥维>,\n",
       " <Friend: 国防科大李彩华>,\n",
       " <Friend: 汪也姐姐>,\n",
       " <Friend: 李如松>,\n",
       " <Friend: N3张毫毫>,\n",
       " <Friend: N3程谦>,\n",
       " <Friend: 郑口老丁>,\n",
       " <Friend: 王俊翔>,\n",
       " <Friend: N3侯宇航>,\n",
       " <Friend: N3厕所姐妹>,\n",
       " <Friend: N3禄婕一>,\n",
       " <Friend: 吴伟杰开课>,\n",
       " <Friend: N3邱桐>,\n",
       " <Friend: 刘旭>,\n",
       " <Friend: N雷秋娅>,\n",
       " <Friend: N3俞晓伟>,\n",
       " <Friend: N3李森>,\n",
       " <Friend: 曾迪>,\n",
       " <Friend: N3任笑莹师姐>,\n",
       " <Friend: N3曾立腾>,\n",
       " <Friend: N3赵栋梁>,\n",
       " <Friend: N1白玉琦>,\n",
       " <Friend: N社联朱鼎天>,\n",
       " <Friend: 史逸华>,\n",
       " <Friend: N3汪鑫>,\n",
       " <Friend: N3张婷颖>,\n",
       " <Friend: N4赵文悦>,\n",
       " <Friend: 于珺>,\n",
       " <Friend: N3王谨辞>,\n",
       " <Friend: N3刘镭>,\n",
       " <Friend: N研工部吴海叶>,\n",
       " <Friend: shopping勿幕精酿>,\n",
       " <Friend: N社联刘俊生>,\n",
       " <Friend: N3王宣>,\n",
       " <Friend: N3杨秋实>,\n",
       " <Friend: N3冯景祥>,\n",
       " <Friend: N3刘梦莹>,\n",
       " <Friend: 孙雨朦>,\n",
       " <Friend: N3李刚>,\n",
       " <Friend: N3严有玉>,\n",
       " <Friend: 腾讯教育赵丽华>,\n",
       " <Friend: N社联李琪>,\n",
       " <Friend: N2吴敏>,\n",
       " <Friend: 郑口何仲轩>,\n",
       " <Friend: N3李昶>,\n",
       " <Friend: 衡中李若飞>,\n",
       " <Friend: N3李攀>,\n",
       " <Friend: 郑口高德>,\n",
       " <Friend: N社联刘泽华>,\n",
       " <Friend: N3余静>,\n",
       " <Friend: 衡中李响>,\n",
       " <Friend: 郑口乔云亮>,\n",
       " <Friend: N女生训练营_吕慧玲>,\n",
       " <Friend: N3冉冰洁>,\n",
       " <Friend: N3康栌月>,\n",
       " <Friend: 铭玮>,\n",
       " <Friend: Audrey 小学专题课运营>,\n",
       " <Friend: N3贾江帆>,\n",
       " <Friend: N3胡志强>,\n",
       " <Friend: N老师麻美龄>,\n",
       " <Friend: N社联陈勇彪>,\n",
       " <Friend: 徐佳超>,\n",
       " <Friend: 衡中叶志远>,\n",
       " <Friend: 睿睿哥女票娟娟>,\n",
       " <Friend: 郑口冯颖慧>,\n",
       " <Friend: 衡中宋博伦>,\n",
       " <Friend: 郑口刘金旭>,\n",
       " <Friend: 阳哥>,\n",
       " <Friend: 胡治国 重点室>,\n",
       " <Friend: 衡中杨帆>,\n",
       " <Friend: N传奇哥>,\n",
       " <Friend: N郑口杨明远>,\n",
       " <Friend: N3白俊>,\n",
       " <Friend: 王春晓>,\n",
       " <Friend: N3婉秋>,\n",
       " <Friend: N招办谢妮妮老师>,\n",
       " <Friend: 郑口张杰>,\n",
       " <Friend: N社联王文聪>,\n",
       " <Friend: 衡中_白明慧>,\n",
       " <Friend: N3崔沁青>,\n",
       " <Friend: 毕莹>,\n",
       " <Friend: N曹天奇>,\n",
       " <Friend: shoppingrainbow house>,\n",
       " <Friend: N3曾盎>,\n",
       " <Friend: N3黄智辉>,\n",
       " <Friend: 郑口刘文燕>,\n",
       " <Friend: N3孙英棣>,\n",
       " <Friend: 衡中王国腾>,\n",
       " <Friend: 刘浩哲>,\n",
       " <Friend: shopping  澳大利亚>,\n",
       " <Friend: 郑口靳永生>,\n",
       " <Friend: N3王韵>,\n",
       " <Friend: N3黄宁杰>,\n",
       " <Friend: N工大户外聽雨>,\n",
       " <Friend: N树洞 曹雅雯>,\n",
       " <Friend: N平姐>,\n",
       " <Friend: N3王奇师兄>,\n",
       " <Friend: N3陈赓>,\n",
       " <Friend: 郑口刘明赫>,\n",
       " <Friend: JAY>,\n",
       " <Friend: 鹏子>,\n",
       " <Friend: 黄令群>,\n",
       " <Friend: 郑口田玲燕>,\n",
       " <Friend: 衡中孟颖迪>,\n",
       " <Friend: shopping  Korea DG>,\n",
       " <Friend: 棉森短短>,\n",
       " <Friend: 卜哲媛>,\n",
       " <Friend: 衡中王佳辉>,\n",
       " <Friend: N3李琛>,\n",
       " <Friend: shopping 专注外壳>,\n",
       " <Friend: 王小妹>,\n",
       " <Friend: 郑口高娜>,\n",
       " <Friend: N3陈哲师兄>]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "LOG OUT!\n"
     ]
    }
   ],
   "source": [
    "bot.friends()#获取好友名字"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dict_values(['男性', '女性', '其他'])\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[342, 235, 40]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "id2sex={1:'男性',2:'女性',0:'其他'}\n",
    "index=[id2sex[i.sex]for i in friends]#做循环，然后取出i的性别\n",
    "print(id2sex.values())\n",
    "num=[index.count(i) for i in id2sex.values()]\n",
    "num"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"31196dfa3bff4489944a0a72cc2d7edf\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_31196dfa3bff4489944a0a72cc2d7edf = echarts.init(\n",
       "                    document.getElementById('31196dfa3bff4489944a0a72cc2d7edf'), 'white', {renderer: 'canvas'});\n",
       "                var option_31196dfa3bff4489944a0a72cc2d7edf = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7537\\u6027\",\n",
       "                    \"value\": 342\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5973\\u6027\",\n",
       "                    \"value\": 235\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5176\\u4ed6\",\n",
       "                    \"value\": 40\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"30%\",\n",
       "                \"75%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"25%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"roseType\": \"radius\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u7537\\u6027\",\n",
       "                \"\\u5973\\u6027\",\n",
       "                \"\\u5176\\u4ed6\"\n",
       "            ],\n",
       "            \"selected\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    }\n",
       "};\n",
       "                chart_31196dfa3bff4489944a0a72cc2d7edf.setOption(option_31196dfa3bff4489944a0a72cc2d7edf);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x1fa8a0e84c8>"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Pie\n",
    "import pyecharts.options as opts\n",
    "\n",
    "pie=(\n",
    "      Pie(init_opts=opts.InitOpts(width='720px',height='320px'))#画布大小\n",
    "    .add(series_name='',data_pair=[(j,i)for i,j in zip(num,id2sex.values())],radius=['30%','75%'],\n",
    "        center=['25%','50%'],rosetype='radius')#用半径大小表示大小\n",
    ")\n",
    "pie.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "friends[0].city\n",
    "friends[1].city\n",
    "citys=[i.city for i in friends if i.city !='' ]\n",
    "city_num={i:citys.count(i) for i in list(set(citys)) if citys.count(i)>2}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Anaconda\\lib\\site-packages\\pyecharts\\charts\\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"cde8ea6c028641f4a3f679c65fd8b69d\" style=\"width:720px; height:320px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_cde8ea6c028641f4a3f679c65fd8b69d = echarts.init(\n",
       "                    document.getElementById('cde8ea6c028641f4a3f679c65fd8b69d'), 'white', {renderer: 'canvas'});\n",
       "                var option_cde8ea6c028641f4a3f679c65fd8b69d = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"heatmap\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u6c49\",\n",
       "                    \"value\": [\n",
       "                        114.31,\n",
       "                        30.52,\n",
       "                        3\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u54c8\\u5c14\\u6ee8\",\n",
       "                    \"value\": [\n",
       "                        126.63,\n",
       "                        45.75,\n",
       "                        9\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        118.78,\n",
       "                        32.04,\n",
       "                        5\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e30\\u53f0\",\n",
       "                    \"value\": [\n",
       "                        116.28,\n",
       "                        39.85,\n",
       "                        4\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7ea2\\u6865\",\n",
       "                    \"value\": [\n",
       "                        117.15,\n",
       "                        39.17,\n",
       "                        3\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u95f5\\u884c\",\n",
       "                    \"value\": [\n",
       "                        121.38,\n",
       "                        31.12,\n",
       "                        6\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u6dc0\",\n",
       "                    \"value\": [\n",
       "                        116.3,\n",
       "                        39.95,\n",
       "                        36\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u77f3\\u5bb6\\u5e84\",\n",
       "                    \"value\": [\n",
       "                        114.48,\n",
       "                        38.03,\n",
       "                        9\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u5b89\",\n",
       "                    \"value\": [\n",
       "                        108.95,\n",
       "                        34.27,\n",
       "                        116\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u83cf\\u6cfd\",\n",
       "                    \"value\": [\n",
       "                        115.480656,\n",
       "                        35.23375,\n",
       "                        4\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u676d\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        120.19,\n",
       "                        30.26,\n",
       "                        10\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u57ce\",\n",
       "                    \"value\": [\n",
       "                        116.37,\n",
       "                        39.92,\n",
       "                        5\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6210\\u90fd\",\n",
       "                    \"value\": [\n",
       "                        104.06,\n",
       "                        30.67,\n",
       "                        4\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u5f00\",\n",
       "                    \"value\": [\n",
       "                        117.15,\n",
       "                        39.13,\n",
       "                        5\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d66\\u4e1c\\u65b0\\u533a\",\n",
       "                    \"value\": [\n",
       "                        121.53,\n",
       "                        31.22,\n",
       "                        4\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6df1\\u5733\",\n",
       "                    \"value\": [\n",
       "                        114.07,\n",
       "                        22.62,\n",
       "                        11\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c88\\u9633\",\n",
       "                    \"value\": [\n",
       "                        123.38,\n",
       "                        41.8,\n",
       "                        3\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5a01\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        122.1,\n",
       "                        37.5,\n",
       "                        3\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u5c9b\",\n",
       "                    \"value\": [\n",
       "                        120.33,\n",
       "                        36.07,\n",
       "                        7\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4fdd\\u5b9a\",\n",
       "                    \"value\": [\n",
       "                        115.48,\n",
       "                        38.85,\n",
       "                        5\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8861\\u6c34\",\n",
       "                    \"value\": [\n",
       "                        115.72,\n",
       "                        37.72,\n",
       "                        29\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u671d\\u9633\",\n",
       "                    \"value\": [\n",
       "                        120.27,\n",
       "                        41.34,\n",
       "                        13\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u90af\\u90f8\",\n",
       "                    \"value\": [\n",
       "                        114.47,\n",
       "                        36.6,\n",
       "                        3\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"pointSize\": 20,\n",
       "            \"blurSize\": 20\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"china\",\n",
       "        \"roam\": true,\n",
       "        \"itemStyle\": {\n",
       "            \"color\": \"#323c48\",\n",
       "            \"borderColor\": \"#11\"\n",
       "        },\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_cde8ea6c028641f4a3f679c65fd8b69d.setOption(option_cde8ea6c028641f4a3f679c65fd8b69d);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x1fa8a3e4f88>"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Geo,Map\n",
    "import pyecharts.options as opts\n",
    "from pyecharts.globals import ChartType\n",
    "\n",
    "(\n",
    "  Geo(init_opts=opts.InitOpts(width='720px',height='320px'))\n",
    "    .add_schema(maptype='china',itemstyle_opts=opts.ItemStyleOpts(color='#323c48',border_color='#11'))\n",
    "    .add('',[(i,j)for i,j in city_num.items()],type_=ChartType.HEATMAP)\n",
    "     .set_global_opts(visualmap_opts=opts.VisualMapOpts())\n",
    "\n",
    ").render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "friends[0].sex"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
